1. Change Event:
$ (document). Ready (function () {$ (' #mySelect '). Change (function () {})});
$ (". Field"). Change (function () {
$ (this). CSS ("Background-color", "#FFFFCC");
});
2. Replace line breaks in a string:
Line.replaceall ("\\\\r\\\\n", "<br>")
3. Picture Width Height:
4. Pop-up window:
window.open (' page.html ', ' newwindow ', ' Height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no , Resizable=no,location=no, Status=no ')
Parent Window Method: Window.opener.method ()
5. Confirm the Label:
var r=confirm ("Press a Button") if (r==true) {}
6. Open the page in the IFRAME:
<body>
<a href = "http://www.sohu.com" target= "Dataframe" > Links </a>
<iframe name= "Dataframe" height= "480" width= "475" ></frame>
</body>
the method by which the IFrame parent window and child windows call each other:
HTML syntax: <iframe name= "MyFrame" src= "child.html" ></iframe>
Parent window Call Child window: MyFrame.window.functionName ();
child window Product Call Parent window: Parent.functionname ();
In short, it is the addition of a parent to a variable or function that is called in a child window. That's it.
7. get the value of the selected radio:
$ ("Input[name= ' aaa ']:checked"). Val ()
8. JS in the replacement command:
Replace first: Str.replace (/microsoft/, "W3school")
Global Replacement: Str.replace (/microsoft/g, "W3school")
Reference: http://www.w3school.com.cn/jsref/jsref_replace.asp
9. Anchor Point:
<a href= "#001" > Jump to 001</a>
... Text omitted
<a name= "001" id= "001" ></a>
... Text omitted
In fact, the anchor point just name can be, plus ID is to make it more compatible. The value of the href must be the same as name \ I d, preceded by "#"
Ten. Linkedhashmap in order
11. Set CSS Properties:
$ (". Btn1"). Click (function () {
$ ("P"). CSS ("Color", "red");
});、
Volecity Traverse Map:
#foreach ($infos in $lineBusiness. EntrySet ())
${infos.key} ${infos.value}
#end
See: http://mingyundezuoan.iteye.com/blog/2205182
The encoding is set in the Xshell transfer file to prevent garbled characters:
FILE--Properties--options--connect--Using UTF-8 encoding
Zhou Kee 2015.07.17