1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vera_Pavlovna [14]
3 years ago
8

How to Print output in JavaScript

Computers and Technology
1 answer:
katrin [286]3 years ago
8 0

If you want to print on a page you can use

document.write();

If you want to write in console then there are multiple options

console.log() - to log information

console.error();- to log errors

console.warn(); - to log warning message

If you want to popup some information the you can use -

alert(message);

there are also various options present in alert.

or

print() essentially just calls up the native print dialog for a given window.

But as you're are thinking, it will work on any window or (i)frame.

thus if you write content to a frame, you can then call this to print it.

window.frameName.print();

note the only drawback (and its a big one), is that this calls up the print dialog... not the print preview window... thus the user doesn't really get a chance to see what they are printing and/or scale it to fit their printer/paper.

I personally wish that all browsers would implement the following to handle the above issue.

window.printPreview();

Hope this will help !!!

You might be interested in
Ns.office.com/Pages/ResponsePage.aspx?id=bd8
bulgar [2K]

Answer:

spreadsheet software

Explanation:

Spreadsheet software is an application that allows users to organize data in columns and rows and perform calculations on the data. These columns and rows collectively are called a worksheet.

6 0
3 years ago
Read 2 more answers
A ________ is a very large general-purpose computer that is capable of performing very many functions as if these are done simul
Soloha48 [4]

Answer:

Mainframe Computer is capable of doing all the functions which are listed in question.

Explanation:

A mainframe is a very large general-purpose computer (usually costing millions of dollars) that is capable of performing very many simultaneous functions, supporting very many simultaneous users, and storing huge amounts of data. A microcomputer is the type of computer you use.

3 0
3 years ago
What is the purpose of using specialized supply chain software?
weeeeeb [17]

Answer:

The purpose of supply chain management is

On the most basic level, the purpose of supply chain management is to make inventory readily available in customer facing positions to fulfill demand. ... Supply chain partners must work together to maximize resource productivity, develop standardized processes, eliminate duplicate efforts, and minimize inventory levels

Explanation:

4 0
2 years ago
Given the following code, what is output by the method call, mystery(6 * 8)? public static void mystery (int x[]) { System.out.p
____ [38]

Answer:

B

Explanation:

This question demonstrates the concept of method overloading

Method overloading means having different versions of the same method. In this case the method mystery() has three versions. The compiler is able to determine which method to call by their different parameters

The first implementation of mystery requires an array of integers as parameter

The second implementation requires an int variable

The third implementation requires a String

The Method call mystery(6 * 8) will output B because 6*8 evaluates to an integer which is the expected argument.

7 0
3 years ago
Please tell fast plzzzzzz.​
lana [24]

Answer:

True

Explanation:

4 0
2 years ago
Other questions:
  • How can i appear offline without fb messenger saying "last active 1 minute ago"?
    5·1 answer
  • Adding a ____ to text adds depth and helps the letters display prominently.
    5·1 answer
  • In python,_______ are used to define the conditions necessary for a while loop to run.
    7·2 answers
  • Having friends who cause you stress can decrease your happiness, which can in turn
    13·2 answers
  • DECIPHER AND SOLVE THIS<br><br> SCC:R<br> D<br> YJOTE VP=GPIMFRT
    15·1 answer
  • Dynamic addressing: __________.
    12·2 answers
  • How do news organizations primarily create revenue?
    12·2 answers
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
  • Which of the following described a global network connecting billions of computers and other
    10·2 answers
  • Why are men more exposed to mass media?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!