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
All of the Internet in your country disappears. What happens next?
Talja [164]

Answer:

It is most likely that in a tech surrounded environment there would be an apacolypse, not necessarily a man hunting man apacolypse but it would cause a huge panic throughout that country because government could not communicate which is what leaves people with a safeplace.

Explanation:

please mark as brainliest xx hope it helps <3

if you really like this topic watch into the forest on netflix, it has the same premise except its not that internet disappears its electricity.

4 0
3 years ago
Write a list comprehension that creates a list containing the numbers that result from the values 1 through 10 being multiplied
Alexeev081 [22]

nums = [x*1.5 for x in range(1,11)]

print(nums)

The first line is the list comprehension and the second prints the list to the screen so you can see that it works.

8 0
3 years ago
The objective of an Enterprise Resource Planning (ERP) system is to create a customized software program that integrates the inf
Fittoniya [83]

Answer:

True

Explanation:

Enterprise resource planning is the integration of various corporate functions using information technology. The main objective of a small or large manufacturing company's ERP project is to track its supply chain activities from inventory purchase to processing and final shipment to customers.

3 0
3 years ago
Which statement is true of integrating an expert system into the database component of a decision support system (DSS)? a. It re
fredd [130]

Answer: option d is correct

Explanation:

It improves quality and efficiency of computer systems. They can have part to whole relations, extrapolations, or predictions.

7 0
3 years ago
Read 2 more answers
You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
Rudiy27

Answer:

<em>A. check box </em>

Explanation:

A check box, selection box, or tick box <em>is a small immersive box that the user can switch to demonstrate an affirmative or negative choice</em>.

It is often observed in applications and operating systems ' HTML input forms, dialog boxes, and GUIs.

A check mark appears inside the box when clicked to signify an affirmative (yes) option. The check mark will vanish when clicking again, suggesting a negative option (no).

6 0
3 years ago
Other questions:
  • Why ois my printer not printing pictjures?
    9·1 answer
  • A service provider, hardware, and web browser are needed to connect to __________.
    8·2 answers
  • ____________ is a widely accepted international best practices framework for implementing information systems security.
    12·1 answer
  • Which image shows organic shapes? <br> A. image 1 <br> B. image 2 <br> C. image 3 <br> D. image 4
    14·2 answers
  • Explain in a few sentences the difference between analytical papers and argumentative papers.
    8·2 answers
  • When you insert a photo into a document, its placed at the ​
    13·2 answers
  • Which of the following will increase the level of security for personal and confidential information on a mobile device if the d
    14·1 answer
  • Write the Stats method record that takes a test score and records that score in the database. If the score already exists in the
    15·1 answer
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
  • PLEASE HELP! WILL MARK AS BRAINLIEST!
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!