Copy Code code as follows:
Onblur= "if (this.value== ') {this.value= ' Please enter the intention of the real estate or customer name or mobile number for inquiries '};"
Onkeypress= "if (event.keycode==13) {javascript: _SD (); return false;}"
Some simple examples of using native JS and jquery to implement arbitrary change div attributes, and reset. The code is as follows:
Copy Code code as follows:
function to change the value of any property of Div
Ext's two methods of cloning:
You can clone objects, data, and so on: var Newjson = Ext.clone (JSON);
Only arrays can be cloned: var Newjson = Ext.Array.clone (JSON);
The jquery approach:
Deep copy "can iterate": var Newjson =
JS complete code:
Copy Code code as follows:
"Http_referer"
Link to the URL address of the previous page of the current page. Not all user agents (browsers) will set this variable, and some can also modify http_referer
The common affirmation is This usage. In fact, not only can you use it on the body to support multiple HTML tags. The usage is as follows:
OnLoad event is triggered when a page or a picture is loaded complete.
Supported HTML Tags:
, , , ,
such as: Number (4.2) +number (9.2)
The two values added alert are equal to 13.399999999999998, why?
such as: Number (2.2) +number (9.7)
Alert comes out equals 11.899999999999998
But a number like this (2.3) +number (9.9)
Alert comes out equals 1
The last "js-implementation of the navigation bar hover" said that the navigation bar hovering on the page in IE running, will be out of the navigation bar constant jitter problem.The workaround is as follows:The navigation bar positioning mode from
Note: Gets the specified style element in the style array of the DOM element
Copy Code code as follows:
function Elementgetstyle (element, style) {
var value = null;
if (Element.style) {
Value = Element.style[style];
}
if (!
js-Implementation navigation bar hover
First, a bureau:
Copy Code code as follows:
Test
1
tab1
tab2
tab3
tab4
2
3
4
5
6
7
To add a simple style:
Copy Code code as follows:
Copy Code code as follows:
Gets the value of the Param parameter in the current window URL
function Get_param (param) {
var query = location.search.substring (1). Split (' & ');
for (Var i=0;ivar kv = query[i].split (' = ');
if (kv[0] = =
The problem with the checked attribute of jquery and checkbox is the control
1, after the success of the page load, click to select or uncheck the Checkbox,checkbox property in the Checked property does not change according to whether the
Mode one:
The checkbox does not have the ReadOnly attribute, and if you use the disabled= "disabled" attribute, the checkbox becomes grayed out, and the user is disgusted with the style so that it remains read-only:
Set its onclick= "return false"
Copy Code code as follows:
+Follow
This is hidden layer
Css:
Copy Code code as follows:
. layer_follow
{
Display:none
}
Js:
Copy Code code as follows:
var
Copy Code code as follows:
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
The cursor stops for a while and jumps to the other side of the box ...
JavaScript controls the two ways that page controls hide the display, except that they are still occupied on the page after the control is hidden
Method One:
Copy Code code as follows:
document.all["Panelsms"].style.visibility= "hidden";
The previous incident encountered a strange problem, JSP page to write a onload event, found incredibly does not work, view source files, Bady after the onload unexpectedly no method name???
Baffled,
So the experiment
Copy Code code as
JS in:
Copy Code code as follows:
function Chooseone (CHK) {
First gets the collection object of the Chekcbox of the same name
var obj = document.getelementsbyname ("chk");
For (i=0 iTo determine if the I element in the Obj collection
Window.location.href=&http://www.webjx.com/javascript/ldquo;url ": Change URL address;
Window.location.replace ("url"): Replace the address with a new URL that replaces the item that is currently cached in history (the client) by specifying a URL,
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