Normally, window. print () is used to print the entire page. However, if you need to print part of the content defined in the web page, you can use the following method:1. Add JavaScript: Webjx. Com to the code header of the page.JavaScript codeWebjx. ComWebpage Tutorial network2. Add That is, append it to the html cor
Design a program in js so that it can print its own method to collect and design a program in Javascript so that it can print itself
Script (function () {alert ("script" + arguments. callee + "() [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Script function a () {document. write (a, "a ()");} a () script
Recently did the Web page schedule printing, the Internet to find some information, and finally use the following method to achieve the functions I need. Place the table in the DIV tag where you want to print the schedule, and then specify the area you want to print, and finally call Window.print to print the specified content.
Sample code (some of the content i
During the weekend, the company went to a school to do an activity. There was a lottery in the middle of the activity. The lottery was carried out according to the number of seats in the meeting room, it is to fold the paper with a seat number in a lottery box. How to quickly design and print these numbers? This problem makes it hard for us to design beautiful women. She uses the design software's conversion method. The shortcut key is usually ctrl +
The example in this article describes the way JavaScript calls the browser print feature. Share to everyone for your reference. Specifically as follows:
1. Universal type, support ie,firefox,chrome ...
Copy Code code as follows:
Window.print ();
2. Only support IE print:
3. Control the print
This article mainly introduces how to traverse and print arrays by JS, and analyzes the techniques related to JavaScript Array traversal and print output by using examples, if you need it, you can refer to the examples in this article to analyze the JS traversal array and print the array method. We will share this with
Today, when I printed the course schedule on the web page, I found some information online and finally used the following method to implement the functions I needed. Put the table of the curriculum to be printed into the DIV label, specify the area to be printed, and call window. Print to print the specified content.
Sample Code (some content in the code has been omitted)
function preview() { bdhtml =
This code is I highcharts from the code of the transformation out of, very grateful to Highcharts author, first chain highcharts address http://www.highcharts.com/, (highcharts Chart code is very good, Super powerful, we can try it!The following code is attached to the JS area printing?
/****************************************功能代码******************************/(function(){window.JPrint = {print: function () {var doc = document,win = wind
IntelliJ IDEA cannot debug JavaScript error handling on Google Chrome. intellijchrome
Waiting for connection from JetBrains IDE support extension has always occurred recently when debugging on Intelli IDEA 14.1.
The solution is as follows:
First, install the Google Chrome browser and the JetBrains IDE support debugging extension on Google Chrome. The error is that the browser does not have the debugging
From: http://blog.csdn.net/chinmo/archive/2008/02/29/2132070.aspx
1. Add JavaScript to the Code header of the page:
JavaScript code
2. Add
That is, append it to the html corresponding to the text to be printed and saved by the user. At the same time, if you use a thief program to obtain remote data and print it, you can place the data within the defined tag.
3
Bug 1:1. The data in this is just a one-dimensional array{"state": 0, "ErrorCode": 0, "data": {"Originalname": "", "Name": "3e12cdbd9d855449440035b3fdaf78bd.png", "url": "Images\/release\/3\/d\/3e12cdbd9d855449440035b3fdaf78bd.png", "Real_url": "Http:\/\/cache.hinabian.com\/images\/release\/3\/d\/3e12cdbd9d855449440035b3fdaf78bd.png "," size ": 94064," type ":". png "," state ":" SUCCESS "}}2. The data in this is a two-dimensional array, is not good to hear is the background is the two-dimension
I don't know why I couldn't debug JavaScript on IE8 of my computer two days ago. I checked the option "Disable script debugging (Internet Explorer)" in the IE option, but it didn't take effect, if it is enabled again, It is selected.
Find a lot of methods on the Internet, the most mentioned method is to modify the registry:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Internet Explorer \ advancedopt
Recently, when printing the course schedule on the web page, I found some information online and finally used the following method to implement the functions I needed. Put the table of the curriculum to be printed into the div label, specify the area to be printed, and call window. print to print the specified content.
Sample Code (some content in the code has been omitted)Copy codeThe Code is as follows:Fu
1, what is the Yang Hui triangle?11 11 2 11 3 3 11 4 6) 4 1Above is a simple example of a Yang Hui triangle.Take a look,The nth row has n elements,The first and nth elements of the nth row are 1,Other elements, assuming that the nth row is the first M element, the value is the first n-1 line m-1 element + The n-1 line of the first M element.2. Attached codeDOCTYPE HTML>HTML>Head> MetaCharSet= "Utf-8"> title>Yang Hui Triangletitle> styletype= "Text/css">Div#container{width:300px;margin:0
Print List title description from tail to headEnter a list to print the values of each node of the list from the end of the head.Implementation code/* function ListNode (x) { this.val = x; This.next = null;} */ function Printlistfromtailtohead (head) { var res=[]; while (head) { res.unshift (head.val); Head=head.next; } return Res;}Related knowledgeCreate a linked list and
, in determining whether the data type of 2 variables is the same (c) function internal array arguments:First, the array can only be used inside the function, to hold the actual arguments, as an item of the array, see an example below:Operating effect:Arguments.callee is a pointer to the function itself, typically used for function recursion(iv) Local variables and global variablesGlobal variables: Acting on the whole scopeLocal variables: defined in functions, used in function fields Note: Ther
To implement the page printing function. This requirement often sounds complicated and advanced, but it is not that difficult. Next I will share a simple method to implement the page printing function, which not only prints the entire page, you can also print a certain area of the page. The following is the specific instance code:
Articles you may be interested in
Jquery checks whether the page has been loaded with the jquery File
Js address bar sp
IE Edge mode results such as the following: function ' s name is function hello () function helloworld001 () {World ()}, function helloworld002 () {World () ; } function helloworld003 () {World ();} JavaScript print function name and referenced function
IE Edge mode results as follows: function ' s name is function hello () function helloworld001 () {World ();} function helloworld002 () {World (); } function helloworld003 () {World ();}JavaScript print function name and referenced function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.