JQuery prints image pdf and txt sample code, and jquery sample code
Add the following code to html:
<Div style = "display: none "> <div id =" to_print "> </div> <input type =" button "id =" print_button "value =" Print "onclick =" document. getElementById ('filetoprint '). focus (); document. getElementById ('filetoprint '). contentWindow. print (); "/> </div> <script> function printSome (path) {// input file path $ ("# to_print" ).html ('<iframe src =' + path + 'id = "FILEtoPrint"> </iframe> '); setTimeout (function () {$ ("# print_button "). click () ;}, 500) ;}</script>
Add a button on the web interface to call js.
Download the sample code of sharp jQuery (version 2nd)
On the jquerycom website, click jquery to download and display a bunch of jquery code. copy and paste all the code in notepad? I am an idiot.
Do you mean to click these links?
Click these download links to open the source code directly, because some browsers read JS files online, such as firefox and chrome, but some browsers do not support this, such as IE, if you click these links on IE, the following will pop up:
Of course, if you want to directly save the file on firefox or chrome, right-click the link above, select "Save as target" to save the file to the desired location.
I hope my answers will resolve your questions.