There will always be a need to prompt announcements in the lower right corner when writing a project. What we need to do is to use simpler code and better user experience. The market has many bullet layers, but the functions are not satisfactory.
Page js CodeCopy codeThe Code is as follows:$. Ajax ({
Url :'...',Type: 'post ',DataType: 'xml ',Error: function (xml ){Alert ("Error loading XML document" + xml );},Success: function (xml ){$ (Xml). find ("X"). each (function (I ){Alert ($ (this).
Copy codeThe Code is as follows: automatic Date input control
birthday: *
Js execution sequence on the html page:1) the first execution in the head label2) execution in the body Tag3) when the onload event is added to the body tag, the
The following code implements the control form submissionCopy codeThe Code is as follows:Function shangchuan (){Var filepath = document. getElementById ("file"). value;Alert (filepath );If (filepath = ""){Alert ("select the uploaded file!
In the upper left corner of google.com.hk, there is a more link with a target address. However, when we click, in most cases, a drop-down list is displayed for users to choose from (this is a typical progressive enhancement form ). How can this
1. javascript includeJavascript does not include statements. In particular, there is dependency between scripts. You cannot dynamically control the loading of scripts. In general, the simplest include statement is basically like this, of course,
1. prevent non-numeric input, except for backspaceCopy codeThe Code is as follows: 2. Restrict the maximum length of the input stringCopy codeThe Code is as follows:// Limit the maximum input lengthVar checkMaxL = function (length ){Var regC =/[^-~]
If you use str. replace ("-","! ") Will only Replace the first matched character.Str. replace (/\-/g ,"! "), You can replace all matched characters (g is the global flag ).
Replace ()The replace () method returns the string that results when you
A function has been developed recently, but it always becomes invalid when the cookie is deleted. Why is it unclear.
When $. cookie ("name", "") is used, a new null cookie is generated.
Use $. cookie ("name", null), and delete the cookie.
Last use$.
Copy codeThe Code is as follows:// Import the JQuery package// Write the JQuery event control page class management Student Management class id class name remarks A1331 Java excellent A1332 Java Web excellent NO. name gender class 100
Copy codeThe Code is as follows: Login.html -->U: P:
This is the logon page. The logon is successful only when the user name is lala and the password is 123. Use return in The onclick event to prevent page Jump when the user name and password do
1. Passing parameters using single quotes: Test1
If one of the parameters contains single quotes, this method will fail. Test1
Improvement: \ 'and OK are added with single quotes. Test
2. The problem of single quotes is solved above, but if
ZTree plug-in Multi-choice drop-down menu instance codeCss and jsCopy codeThe Code is as follows:
HtmlCopy codeThe Code is as follows:
OK Custom js CodeCopy codeThe Code is as follows:
I recently reviewed some of my previous basic knowledge and wrote an image slide plug-in using jquery. Although there are still some problems, it is easy to use. You only need to bind the slideW () function to the target element, this function
I went to the interview the day before yesterday. gg asked some js knowledge, including a call and apply usage question. Although I used the call method 365 days ago, I still couldn't answer it, summary today
Call and apply. They are used to bind a
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