您当前的位置::绿色东东 -> SEO资料 -> 站长技术 -> 建网技术 -> 文章信息
绿色论坛

GD 3C标准修改笔记

  • 原作者:本站原创
  • 文章来源:www.greendd.com
  • 发布时间:2008-7-20 11:56:48

文章介绍

    分为二个部骤:HTML 标准化,CSS标准化
    HTML部分:
    1.结束符">"替换为" />"
    2.字体色类“font color="#008800"”才是正确的,原先“font color=#008800”并不标准。
    反映在:分类名称
    解决:后台“基本设置”中修改默认值。
    3.关于"&"修改为"&"(AMP小写)在URL中,参考信息:
    Ampersands (&'s) in URLs
    Another common error occurs when including a URL which contains an ampersand ("&"):
    <!-- This is invalid! --> <a href="foo.cgi?chapter=1§ion=2©=3&lang=en">...</a>
    This example generates an error for "unknown entity section" because the "&" is assumed to begin an entity reference. Browsers often recover safely from this kind of error, but real problems do occur in some cases. In this example, many browsers correctly convert ©=3 to ?=3, which may cause the link to fail. Since ⟨ is the HTML entity for the left-pointing angle bracket, some browsers also convert &lang=en to ?=en. And one old browser even finds the entity §, converting §ion=2 to §ion=2.
    To avoid problems with both validators and browsers, always use & in place of & when writing URLs in HTML:
    <a href="foo.cgi?chapter=1&section=2&copy=3&lang=en">...</a>
    Note that replacing & with & is only done when writing the URL in HTML, where "&" is a special character (along with "<" and ">"). When writing the same URL in a plain text email message or in the location bar of your browser, you would use "&" and not "&". With HTML, the browser translates "&" to "&" so the Web server would only see "&" and not "&" in the query string of the request.
    4.MARGINHEIGHT=3 不支持此属性,参考:
    Those attributes are either no longer supported, or are browser and/or program specific. Those attributes can be achieved by using CSS. For example, the margin attributes can be replaced with CSS...
    body {
    top:0;
    left:0;
    margin:0;
    padding:0;
    }
    The other errors are also handled the same way. You will need to assign classes to those elements and then utilize CSS to style them.
    官方参考:
    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
    BY LUO:这涉及到IFRAME的W3C标准化问题,可以用JS或CSS解决,我是用JS实现的:以下为前后代码:
    -------------------原来----------------
    <p>公告板:<iframe name=announcement marginheight=3 marginwidth=0 frameborder=0 border=0 vspace=0 width=87% noresize height=16 scrolling=no src="{$InstallDir}gg/announcement.html"></iframe></p>
    -------------------更改----------------
    直接用"IFRAME"不符合"W3C网页标准",JS实现iframe 标准化.  
    一、建立一个JS文件,代码如下:  
    function announcement(url,mh,mw,w,h){document.write('<iframe id="announcement" name="announcement" marginheight="'+mh+' marginwidth="'+mw+' width="'+w+'" height="'+h+'" border="0" vspace=0 frameborder="0" scrolling="no" src="'+url+'"></iframe>');}
    保存成"announcement.js" ,上传到指定目录
    二、在网页中插入代码到HEAD中
    <script type="text/javascript" src="/gg/announcement.js"></script>  
    三、在原先地方用下面代码替换,即:
    :<iframe name=announcement marginheight=3 marginwidth=0 frameborder=0 border=0 vspace=0 width=87% noresize height=16 scrolling=no src="{$InstallDir}gg/announcement.html"></iframe>
    替换为:
    <script type="text/javascript">announcement('http://www.greendd.com/gg/announcement.html','3','0','87%','16');</script>  
    函数announcement()使用说明:announcement('URL地址','MH','MW','W','H',)  
    5.出错:
    Column 2123: there is no attribute "src".
    <SCRIPT src="/gg/top_gd.js"></SCRIPT>
    出错:
    element "SCRIPT" undefined.
    script大写请改为小写,标明type="text/javascript"
    6.document type does not allow element "a" here; assuming missing "li" start-tag.
    .html" title="最新火影忍者,海贼王等高清动画下载">高清电影</a>   <a a" here; assuming missing "li" start-tag.…ist/cartoon-hd-1.html" title="最新高清动画">高清电影</a>   <a self-close" an element, that is, ending it with "/>" instead of ">".
    查找:classmenu.asp中
    strContent = strContent & "<br>"
    替换为
    strContent = strContent & "
    "
    8.there is no attribute "onSubmit".
    onSubmit="window.location=this.field.options[
    解答:字母小写!
    Try using the attribute onsubmit versus onSubmit (no

    [1] [2]  下一页

文章上下页关联