发布于 2016-08-24 21:58:59 | 82 次阅读 | 评论: 0 | 来源: 网友投递
jQuery javascript框架
jQuery是一个兼容多浏览器的javascript框架,核心理念是write less,do more(写得更少,做得更多)。jQuery在2006年1月由美国人John Resig在纽约的barcamp发布,吸引了来自世界各地的众多JavaScript高手加入,由Dave Methvin率领团队进行开发。
<script type="text/javascript" src="jquery-latest.js" src="jquery-latest.js"></script>
$(document).ready(function() {
// Your code goes here
});
<html><head>
<title>Test</title>
<script type="text/javascript" src="jquery-latest.js" src="jquery-latest.js"></script>
<script type="text/javascript"><!--
$(document).ready(function(){
$("h1").addClass("testclass");});
// --></script>
<style type="text/css" media="all">
.testclass { background: yellow; font-size: 20pt; }
</stylegt;
</head>
<body>
<h1>Test</h1>
test
<h1>Test2</h1>
test2
</body></html>
document.body.oncopy = function ()
{
setTimeout(
function ()
{
var text = clipboardData.getData("text");
if (text)
{
text = text + "\r\n本篇文章来源于 站长资讯网 原文链接:"+location.href; clipboardData.setData("text", text);
}
}
,100
)
}