Zhou Kee 2015.07.17

Source: Internet
Author: User

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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.