Advertisements on the D site

Daniel Kozák kozzi11 at gmail.com
Mon Dec 9 05:44:43 PST 2013


Yes, and as a benefit when you validate your xhtml code in w3c validator
you do not have problem with expresions like a < b

Gary Willoughby píše v Po 09. 12. 2013 v 13:53 +0100:
> On Monday, 9 December 2013 at 08:19:49 UTC, Jacob Carlborg wrote:
> > Comment starts here, but inside the JavaScript block. I have no 
> > idea how browsers handle this:
> > <script type="text/javascript"><!--
> >
> > JavaScript comment starts and ends here:
> > /**/google_ad_client = "pub-5628673096434613";
> >
> > Comment ends here, but inside the JavaScript block and 
> > commented out using JavaScript:
> > //--></script>
> 
> It's an old trick. The comment is a HTML comment to stop browsers 
> that don't handle JavaScript from interpreting the JS code as 
> HTML. The closing bracket is commented out because the JS 
> interpreter fails when reading it. This is from back in the day 
> when IE didn't handle JS only VBScript.




More information about the Digitalmars-d mailing list