网页js脚本,网页javascript脚本

1,网页javascript脚本<script language="javascript" type="text/javascript">var theMonths = new Array(12);theMonths[0] = "Jan";theMonths[1] = "Febg";theMonths[2] = "Marfg";theMonths[3] = "Aprvbh";theMonths[4] = "Maycvbg";for(var i=0;i<12;i++)alert(theMonths[i]);}楼主你好,上面代码确实不会弹出任何东西 。theMonths[0] = "Jan";theMonths[1] = "Febg";theMonths[2] = "Marfg";theMonths[3] = "Aprvbh";theMonths[4] = "Maycvbg";这是你的几个赋值,没有一个满足if条件0不等于Jan的长度 ,1不等于"Marfg"长度,你看看是不?
2 , 在网页中有几种嵌入JavaScript脚本的方式三种:1、引入外部js2、文档内部标签<javascript></...>3、行内js——javascript:return void(null)或javascript:return confirm("……");等绝对路径网络路径getScript1.<script type="text/javascript">document.write("Hello World!");</script>2.使用外部 JavaScript<script src="http://www.lisdn.com/gkrj/shwd/xxx.js"></script>你好!1.<script type="text/javascript">document.write("Hello World!");</script>2.使用外部 JavaScript<script src="http://www.lisdn.com/gkrj/shwd/xxx.js"></script>希望对你有所帮助,望采纳 。【网页js脚本,网页javascript脚本】

    推荐阅读