ASP. NET 2.0: Pay attention to the CSS and JS files linked to pages with Chinese characters
Source: Internet
Author: User
When the defined style contains Chinese characters, such. sometyle {font-family: @ ;}. If the writing is incorrect, as shown in. sometyle {font-family: ;}, this should be an incorrect way of writing. In this way, not only does this style not work, but also affects the style behind it, I don't know whether the parsing of CSS is the rule or ASP. NET 2.0 problems. When you directly add the JS file downloaded from the Internet to the vs2005 project, if the file contains Chinese characters, when you call the method, a js error cannot be found for the object, just as if you didn't chain it like this file. You need to create a new JS file in the project and CodeCopy the file to the new file and use the new file. This problem should be about file encoding. In addition, ASP. net2.0 adopts the XHTML 1.0 standard, whereas 1.x is HTML 4.0. We can see from the HTML source file headers of the two. <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en"> therefore, the defined elements must comply with the XHTML 1.0 specification. For example, the length must be subject to an additional unit, such as width: 100px; width: 100 does not work.
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.