It is inevitable to encounter various problems in the production of WEB websites. The following are some problems encountered during development and their experiences and experiences to avoid detours. 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. For example: a.htm refers to xb.js, and b.js refers to xc.js, then the file should be xc.js instead of c.js, the direct path relative to b.js, and @import in css , url() reference does not have this problem 5. On the page, sometimes setting the width of the talbe to 100% will leave a blank space for the scroll bar 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 them up to change the background), it is best to use <a>, without writing additional code. , just use the pseudo-class:hover. The advantage of using css is that everything can be changed at once, which can be well used in skin-changing applications. 7. @font-face {font-family:comic;src:url(http://valid_url/some_font_file.eot);} To define a font name that is not available locally, call <span style="font-family:comic;font-size:18pt>aa</span> 8. A few CSS Here is a quote: To force overflow to occur and apply the ellipsis value, the author must set the object's white-space property to nowrap. If there is no opportunity for line breaks (for example, the width of the object container is narrow and there is a long text without reasonable line breaks), it is possible to overflow without applying 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 under Firefox. You need to directly define style='width:10px;' 11. The CSS cursor in Firefox does not support hand, so use pointer instead. 13. During the onpropertychange event, pay attention to using event.propertyName to filter the property change event. When setting this event, the onpropertychange property 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. 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. When CreateTextFile contains Chinese characters, the third parameter must be specified as true, otherwise Chinese characters cannot be written, and an error occurs when Write is reported. 18. When saving Chinese text, use ADODB.stream instead of fso, because FSO does not support utf-8 format.
4. References in the form of document.wirte("<script language='javascript' src='" + file + "'></" + "script>" are used in the js file, and the relative paths of the files refer to the js html path.
div { overflow: hidden; text-overflow:ellipsis; }
td { vertical-align : middle; }
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.
15. The slice function is slower than directly looping to obtain array fragments.