Posted By

jaff on 02/22/10


Tagged

javascript inline validation validator


Versions (?)

Avoid HTML validators in your javascript inline code with CDATA


 / Published in: JavaScript
 

Use /* <![CDATA[ */ to make validators ignore the javascript code.

  1. <script type="text/javascript">
  2. /* <![CDATA[ */
  3. Javascript code
  4. /* ]]> */
  5. </script>

Report this snippet  

You need to login to post a comment.