开发者

How can make this adserver snippet validate to W3C standards?

I have a made a contract with an adserver to serve ads on my website and the html snippet they give me does not validate, I am having a hard way trying to make it validate.

My header is transitional.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The html code I was given is the following.

<script  language="javascript"  type="text/javascript">iwsrcplus="http://codenew.impresionesweb.com/r/banner_iw.php?idrotador=82140&tamano=160x600&lgid="+((new Date()).getTi开发者_运维技巧me() % 2147483648) + Math.random(); document.write("<scr"+"ipt language=javascript  type=text/javascript src="+iwsrcplus+"></scr"+"ipt>");</script><noscript><iframe src="http://alt.impresionesweb.com/noscript.php?tam=160x600&idp=82140&ref=82140&cod=160915" width="160" height="600" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></noscript>

It does not validate just by changing the & to &amps;.


You have to change the & symbols into...

&amp;

Then post whatever other errors you get.

EDIT:

I validated all of your code as follows...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
       <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
       <title></title>
    </head>

    <body>

    <script  language="javascript"  type="text/javascript">
    //<![CDATA[
        iwsrcplus="http://codenew.impresionesweb.com/r/banner_iw.php?idrotador=82140&amp;tamano=160x600&amp;lgid="+((new Date()).getTime() % 2147483648) + Math.random(); document.write("<scr"+"ipt language=javascript  type=text/javascript src="+iwsrcplus+"></scr"+"ipt>");
    //]]>
    </script>
    <noscript><iframe src="http://alt.impresionesweb.com/noscript.php?tam=160x600&amp;idp=82140&amp;ref=82140&amp;cod=160915" width="160" height="600" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></noscript>

    </body>

</html>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜