If the request url does not change, get the cache to improve efficiency. The request will be cached in the browser. You can view the user information through history, which is less secure;
Post transmission shows changed data and changes access;
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
In the past two days, I made a business to determine the browser type and version number, and recorded the relevant js Code:Copy codeThe Code is as follows:Function allinfo (){Var ua = navigator. userAgent;Ua = ua. toLowerCase ();Var match =/(webkit)
Now there is a drop-down box with id = test. How can I get the selected value?Use javascript native methods and jquery methods respectivelyCopy codeThe Code is as follows: text1 text2 I. Native javascript Method 1: Get the select object: var
Some time ago, Json data was used in work, and some simple additions, deletions, modifications, and queries can be placed on the client, which can also reduce the pressure on the server. I searched several javascript class libraries that can operate
1. Basic preparation:The scrollTop () method returns or sets the vertical position of the scroll bar that matches the element.Scroll top offset refers to the offset of the scroll bar relative to its top.If no parameter is set for this method, the
First glance at jsonpJsonp is short for JSON with Padding. It is a solution for cross-origin request resources. Most of the time, we need to obtain server data on the client for operations. Generally, we use ajax + webservice to do this, but if we
Use of this in JavaScriptIn JavaScript, this variable is a keyword that is hard to understand. this is very powerful. A full understanding of this helps us to easily write object-oriented JavaScript programs.The most important thing about this
Copy codeThe Code is as follows:Var tt = function (obj){Return function (){Alert (obj. tagName); // an execution function that can be defined externally;}}Function addfunction (){Var bigobj = document. getElementById ("mytable ");Var rows = bigobj.
In JavaScript, the typeof operator is used to judge the type of a variable. When the typeof operator is used, a problem occurs when the reference type storage value is used. No matter what type of object is referenced, it returns "object ". This
Copy codeThe Code is as follows:Input type = "button" onclick = "document.exe cCommand ('open')" value = openInput type = "button" onclick = "document.exe cCommand ('saveas')" value = saveInput type = "button" onclick = "document.exe cCommand
Copy codeThe Code is as follows:// Make the page uneditableFunction disableOcx (){Var form = document. forms [0];For (var I = 0; I Var element = form. elements [I];// Some elements can be numbered. element. name is the custom name of the element.If (
Js tools-common js methods and common js judgment methodsSUMMARY:Copy codeThe Code is as follows:Function obj $ (id) Get the object according to the idFunction val $ (id) obtains the object Value Based on the id.Function trim (str) deletes spaces on
Copy codeThe Code is as follows: License:Copy codeThe Code is as follows: Link:Copy codeThe Code is as follows: return to the previous step. "> return to the previous step Direct jump:Copy codeThe Code is as follows: Open a new window:Copy codeThe
Submit is a special case of a button and also a kind of button. It automatically integrates the submit action.If the form needs to be processed (including input verification) by clicking the submit button and then submitted, you must change the
Write cookie instance!Copy codeThe Code is as follows:Var u = "value = 123 ";Document. cookie = u; Read the cookie instance and read the value!Copy codeThe Code is as follows:Var c_name = "value"; // variable nameIf (document. cookie. length> 0
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service