Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript close window after print

<script type="text/javascript">
  window.print();
  window.onafterprint = window.close;	
</script>
Comment

javascript on close print

<script type="text/javascript">
  	window.print();
	window.onafterprint = () => alert("print dialog closed.");
</script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript padstart 
Javascript :: python print pretty json 
Javascript :: hash change listener js 
Javascript :: modal resetting when hide 
Javascript :: call a function when page loads javascript 
Javascript :: best way to detect mobile device jquery 
Javascript :: nodejs fs delete entire folde 
Javascript :: filter array with unique objects javascript 
Javascript :: loop through checkboxes jquery 
Javascript :: javascript document load 
Javascript :: python convert requests response to json 
Javascript :: enzyme adapter react 17 
Javascript :: get radio button value javascript 
Javascript :: how to remove a class in js after 100 milliseconds 
Javascript :: jquery remove br from div 
Javascript :: js get time in am 
Javascript :: jquery continue each loop 
Javascript :: nangular make window available 
Javascript :: css customize console.log 
Javascript :: moment add 30 days 
Javascript :: am pm to 24 hours converter javascript 
Javascript :: js timer loop 
Javascript :: update node .js 
Javascript :: Codewars Beginner Series #3 Sum of Numbers 
Javascript :: how to check if jquery is loaded 
Javascript :: method domain validator js 
Javascript :: discord.js kick user 
Javascript :: js preventdefault 
Javascript :: if is array javascript 
Javascript :: react native length of object 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =