deadhippo
先輩
- 9 Apr 2005
- 383
- 30
Hi
i spend a lot of time trying to keep my site xhtml and css valid but the code from the banner exchange is a mess
i dont know that much about code so i was wondering if someone can help me validate this code and thereby validate my page
the following is after i cleaned it up a little, by getting rid of the caps and replacing '&' with '&'
this cut the errors from about 36 to 3
this is the original code
any help would be appreciated
if i can solve it by myself ill post the results here
the page i am trying to validate is my homepage - CLICK HERE
this is the validation result
i spend a lot of time trying to keep my site xhtml and css valid but the code from the banner exchange is a mess
i dont know that much about code so i was wondering if someone can help me validate this code and thereby validate my page
the following is after i cleaned it up a little, by getting rid of the caps and replacing '&' with '&'
this cut the errors from about 36 to 3
<!-- Japan Banner Exchange Begin -->
<center>
<script language="JavaScript" type="text/javascript">
document.write('<s'+'cript language="JavaScript" src="Japanese culture, language, history, and travel Date().getTime()+'"></s'+'cript>');
</script>
<noscript>
<iframe src="Japanese culture, language, history, and travel" width="477" height="60" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>
</noscript>
</center>
<!-- Japan Banner Exchange End -->
this is the original code
<!-- Japan Banner Exchange Begin -->
<center>
<script language="JavaScript">
document.write('<s'+'cript language="JavaScript" src="Japanese culture, language, history, and travel Date().getTime()+'"></s'+'cript>');
</script>
<NOSCRIPT>
<IFRAME SRC="Japanese culture, language, history, and travel" width=477 height=60 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></IFRAME>
</NOSCRIPT>
</center>
<!-- Japan Banner Exchange End -->
any help would be appreciated
if i can solve it by myself ill post the results here
the page i am trying to validate is my homepage - CLICK HERE
this is the validation result
#Line 23, column 18: an attribute specification must start with a name or name token
document.write('<s'+'cript language="JavaScript" src="http://ad.jref.com/work.ph
Check for stray quotes or incomplete attribute definitions.
#Line 23, column 18: document type does not allow element "s" here
document.write('<s'+'cript language="JavaScript" src="http://ad.jref.com/work.ph
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
#Line 23, column 144: delimiter "'" invalid: only S separators and TAGC allowed here
...amp;code='+new Date().getTime()+'></s'+'cript>');
Last edited: