1,在看到javascript在xhtml中的用法时,涉及到字符转义,代码的书写形式变为
1 <script type="text/javascript"><!CDATA[ 2 funtion compare(a,b){ 3 if(a < b){ 4 alert("a < b"); 5 } 6 } 7 ]]></script>
2,兼容浏览器不支持javascript的方法,代码格式为
<script><!-- function sayHi(){ alert("Hi!"); } //--></script>
总结:javacript在实际项目中的应用非常大,而且要想成为web编程牛人,javascript必须精通,所有顺着这条路线,我希望自己能越走越远,越来越充实。