Experience a few _ Application skills

Source: Internet
Author: User
The following is my development encountered problems and experience, spent some time debugging, posted out to avoid everyone less detours, if there are errors welcome corrections,
Keep updating ing
XML files as much as possible to utf-8 encoding, gb2312 some words are not stored, such as ©, even if you can save also need conversion, more trouble, Utf-8 also meet
International norms
CSS: hover this pseudo class, if placed in: visited before it will fail
<a> tags if there is no href attribute, all the pseudo classes on its CSS such as: hover are invalidated
JS file with Document.wirte ("<script language= ' javascript ' src= '" + file + "' ></" + "script>" form of
Reference whose file relative path is the path of the HTML that references the JS.

For example: a.htm references x\b.js,b.js reference x\c.js, then file should be x\c.js instead of direct path b.js relative c.js, and CSS
@import, URL () reference does not exist for this problem

In the page, sometimes the talbe width is set to 100% the right also leaves a scroll bar blank, please set the <body
style= "Overflow:auto" >
For commonly used images do not use IMG tags, use <span><a> and CSS to specify their background and width, for the dynamic (moving up the background)
, use <a> best, do not need to write additional code, as long as the use of pseudo-class: Hover is good, the use of CSS benefits is a change in all changes, this
Can be well used in the application of skin-changing
@font-face {
font-family:comic;
Src:url (HTTP://VALID_URL/SOME_FONT_FILE.EOT);
}
Defines a font name that is not locally called <span style= "font-family:comic;font-size:18pt>aa</span>
Several CSS
div {overflow:hidden;text-overflow:ellipsis;}
td {Vertical-align:middle;}
To force an overflow to occur and to apply the ellipsis value, the author must set the White-space property value of the object to nowrap.
If there is no line-breaking opportunity (for example, the width of the object container is narrow and there are long lines of text without reasonable break), there is no application nowrap
It is also possible to overflow.
In order for the ellipsis value to be applied, this property must be set to an object with an unreachable region. The best option is to set the overflow property
For hidden
Firefox's document.createelement does not support HTML tags in content, nor does it support innertext, but supports innerHTML, which can
Specify its contents with innerHTML
In the. NET control, the width of the DropDownList under Firefox is not shaded, and you need to define style= ' width:10px directly;
Firefox in the CSS cursor does not support hand, using pointer instead
The scroll bar in the IFRAME needs to be set style= ' Overflow:hidden ' in the IFRAME tag, not only in the body, but in Firefox
Have a problem
When Onpropertychange an event, note that using the Event.propertyname to change event filtering on the property, when setting this event, is actually
Changed the Onpropertychange this property, so it is automatically executed once
The support version for XSL in js5.6 is lower, as the document function does not support
Slice function is slower than direct looping to get an array fragment
NextSibling when you get the next object, be aware that there are no spaces between the two nodes, otherwise it's easy to get the right objects
CreateTextFile must specify the third argument to be true when there is Chinese, otherwise it cannot be written in Chinese, as write write times are wrong
Use ADODB.stream when saving Chinese text, do not use FSO because the FSO does not support UTF-8 format

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.