When we talked about boolean operators & |, I said that their results are boolean values. This is a bit too simple. If you use them to calculate boolean data types, they do return boolean values. However, they can also be used to calculate other
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.
Two days ago, I received a task like this: when a user uploads an attachment, the user needs to verify the ID card information in the uploaded attachment. If an error message exists, all the error information should be displayed.At the beginning, I
The following is the JS Code ::
@ Author YHC:
Copy codeThe Code is as follows:Function getCurrentMonthLastDay (){Var current = new Date ();Var currentMonth = current. getMonth ();Var nextMonth = ++ currentMonth;Var nextMonthDayOne = new Date
Use jquery to operate iframe
1. The content contains two ifame
In leftiframe, jQuery changes the src code of mainiframe:$ ("# Mainframe", parent.doc ument. body). attr ("src", "http://www.radys.cn ")
2. If the content contains an ifame with the ID
In Javascript, void is an operator that specifies to calculate an expression but does not return a value.The format of the void operator is as follows:1. javascript: void (expression)2. javascript: void expressionExpression is a standard Javascript
Click (), bind (), and live () are all the methods used to execute events. They have some differences before. We should select as needed when using these methods.
1. The click () method is a frequently used click Event method:Copy codeThe Code is as
I. OverviewStrings are almost everywhere in JavaScript. When you process user input data and read or set DOM object attributes, there are more strings when operating cookies .... The core part of JavaScript provides a set of attributes and methods
A buddy wants to add the border effect when the mouse passes through the image. Unfortunately, the starting point is wrong. It is directly added to the tag outside the IMG, causing the image to collapse when the mouse passes through, in fact, you
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 =/[^-~]
Note:Ensure that the verification is performed before the form is submitted. If there are null items in the verification result, the form cannot be submitted and a verification error message is prompted, when the verification page property is not
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
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.