Tips for development (I.)

Source: Internet
Author: User

One: All browsers only Google open times wrong

Net::err_blocked_by_client

Solution: Turn off the plugin Adblock on google

Second: When nested in the multi-layer quotation mark, need to carry out the quotation mark Escape to run, the quotation mark preceded by "\" to realize the conversion.

It is particularly easy to produce multiple layers of nested quotes when generating HTML structures. As follows:

' <input type= ' text "onkeyup=" value=value.replace (/[^\w\.\/]/jg,\ ' \ ') "> ' +//' <input type=" text "onkeyup=" Value=value.replace (/[^\W\.\/]/JG, ') ' > ' + ' <em>--</em> ' +

Three: The difference between attr and prop in jquery

1. For attributes with HTML elements themselves, use the Prop method when processing

2. For attributes that are not in the HTML element itself, use the attr method when processing

When elements such as Checkbox,select and radio

$ ("#chk1"). Prop ("Checked") =====false$ ("#chk1"). Prop ("checked") =====true
$ ("#chk1"). attr ("Checked") =====undefined$ ("#chk1"). attr ("checked") ===== "checked"

PS: $ ("#chk1") when there are multiple IDs or class duplicates. attr ("checked") =====undefined also appear, each of which should be traversed by each element

 

Tips for development (I.)

Related Article

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.