1. The xml file should be encoded in utf-8 as much as possible. Some characters in gb2312 cannot be stored, such as ?. Even if it can be saved, it needs to be converted, which is more troublesome. utf-8 also complies with international standards.
2. The pseudo-class :hover in CSS will be invalid if placed in front of :visited.
3. If the <a> tag does not have the href attribute, all its CSS pseudo-classes such as:hover will be invalid.
4. References in the form of document.wirte("<script language='javascript' src='" + file + "'></" + "script>" are used in js files, and their file relative paths are all references to the js The path of html.
For example: a.htm refers to xb.js, and b.js refers to xc.js, then the file should be xc.js instead of the direct path c.js relative to b.js, and css The @import, url() reference in the page does not have this problem.
5. On the page, sometimes setting the width of the talbe to 100% will leave a scroll bar blank on the right side. Please set <body style="overflow:auto">
6. For commonly used images, do not use img tags. Use <span><a> and use CSS to specify the background, width and height. For dynamic images (move up to change the background), use <a>. No additional coding is required. , just use the pseudo-class:hover. The advantage of using css is that you can change everything at once. This can be well used in skin-changing applications.
7. @font-face {font-family:comic;src:url. ( http://valid_url/some_font_file.eot );}
Define a font name that is not available locally and call <span style="font-family:comic;font-size:18pt>aa</span>
8. Several CSS
div { overflow: hidden; text-overflow:ellipsis; }
td { vertical-align : middle; }
[u]To force overflow to occur and apply the ellipsis value, the author must set the object's white-space property to nowrap. [/u] If there is no opportunity for line breaks (for example, the width of the object container is narrow and there is long text without reasonable line breaks), it is possible to overflow without using nowrap.
In order for the ellipsis value to be applied, this property must be set to an object that has an invisible area. The best option is to set the overflow property to hidden.
9. Firefox's document.createElement does not support HTML tags in the content, nor does it support innerText, but it supports innerHTML, and you can use innerHTML to specify its content.
10. The width of the DropDownList in the .net control is not colored in Firefox. You need to directly define style='width:10px;'
11. The CSS cursor in Firefox does not support hand, so use pointer instead.
12. The scroll bar in the iframe needs to set style='overflow:hidden' in the iframe tag. It cannot be set only in the body. It will cause problems in Firefox.
13. During the onpropertychange event, pay attention to using event.propertyName to filter the property change event. When setting this event, the onpropertychange attribute has actually been changed, so it will be executed automatically.
14. The XSL support version in js5.6 is relatively low, for example, the document function is not supported.
15. The slice function is slower than directly looping to obtain array fragments.
16. When nextSibling obtains the next object, please note that there should be no spaces between the two nodes, otherwise it is easy to fail to obtain the correct object.
17. CreateTextFile must specify the third parameter to be true when there is Chinese text, otherwise it cannot write Chinese, which will appear as an error when writing.
18. Use ADODB.stream when saving Chinese text, do not use fso, because FSO does not support utf-8 Format.