js模板,求大神指导

JavaScript015

js模板,求大神指导,第1张

var html=.....(此为你以上的代码)

页面中写个<div id= "div"></div>

$("#div").append(html)

方法一:将javascript代码插入html文档<head>部分的<script>标签中 例:<head><script type=“text/javascript”>alert(‘hello world’)</script></head>方法二:将javascript代码存放在一个独立的文件。用.js作为文件的扩展名,再利用<script>标签的src属性指向该文件。 例:test.js /*这是js文件*/ alert(‘hello wordld’)................................................... test.html /*这是HTML文件*/ <head><script type=“text/javascript”src=“test.js”></script></head> 因为开放JS对网站来说太危险,所以应该像楼上所说,这种网站应该是没有的,起码我没见过。

很多,http://sc.chinaz.com/jiaobendemo.aspx?downloadid=14828152345761 ,也可以从这里面找http://aspx.sc.chinaz.com/query.aspx?keyword=%E7%BC%A9%E7%95%A5%E5%9B%BE&classID=835&page=3