Wednesday, 13 January 2016

JavaScript - How to fix (remove) syntax error in .Net 4.0 in comments


Watch this example on YouTube:



recently, after converting some code from older version to .Net 4.0 I noticed the following error











to fix it replace

      <title></title>
    <script type="text/javascript"> <!--
        DoSomething();

        function DoSomething() {
            alert("doing something");
        }
   --></script>
</head>

with

    <title></title>
    <script type="text/javascript"> <!--
        DoSomething();

        function DoSomething() {
            alert("doing something");
        }
 //  --></script>
</head>

No comments:

Post a Comment