<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">Select the TD label containing the A label $ ("Td:has (A)"). CSS ("Background", "pink"); When the Submit button is clicked, the function that fires is $ (": Submit"). Click (function () {//SELECT ID ID has special character escaping//$ ("#id # #")-->$ ("#id \ #2")//$ ("#id \ #2"). HTML ( "This is #id#2 text content");//The property selector does not have to escape//$ ("[id= ' id#2 ']"). HTML ("This is the text content of #id#2"),//$ ("#id [2]")-->$ ("#id \\[2\\]")//Award The Value property of the label for the text of the broken property is 0 words//if ($ (": Text"). Val (). length==0) {//alert (' username is empty ')/};
The Value property of the last label in the label that determines the property is password is 0 words//if ($ (":p assword:last"). Val (). length==0) {//alert (' Confirm password is null ')/}
Only the attributes for the Text,password label are required. Val () to get the text can accommodate the others do not need to join. Val ()
The value of the label in the label that determines the property to radio is checked the selected state of the tag is not 0, if ($ (": radio:checked"). length!=0) {alert ($ (": radio:checked"). Val ())};if ($ (": checkbox:checked"). length!=0) {alert ($ (": checkbox:checked"). Val ())};
Determine if the Value property of the column in the dropdown box is selected is not equal to "" if ($ (": Selected"). val ()! = "") {Alert ($ (": Selected"). val ())});});
JavaScript syntax when a form is loaded//window.onload=function () {
Get the value of the background background color for the tag with the element ID username tag plus the style in the label and the alert pop-up window//var Box1=document.getelementbyid ("username");//var Box2= "Username:" +box1.style.background;//alert (Box2);
By defining the tag variable you can directly modify the value of the property in the label the following is the syntax for modifying the background color and the Value property in a Style style property simple rude//box1.style.background= "blue";//box1.value= "456"; }</script><style type= "Text/css" >.c{color:red;} </style>Front page syntax for jquery javascript ajax