javascript源码...
时间:2010-08-12 来源:future520
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<style>
div {color:#FF0000;font-weight:bold;}
p{color:#FF0000;font-size:14px;}
</style>
<BODY>
<div id="oDiv">请点击<a href="#">网站链接</a></div>
<script type="text/javascript">
var oStyleSheet=document.styleSheets[0];
var oRule=oStyleSheet.rules[0];
window.alert(oRule.style.color);
oRule.style.color="green";
oRule.style.fontsize="13px";
window.alert(oRule.style.color);
</script>
</BODY>
</HTML>
=================================弹出对话框 改变颜色
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<div style="color:#FF0000;font-weight:bold;" id="oDiv">请点击<a href="#">网站链接</a></div>
<script type="text/javascript">
var oDiv=document.getElementById("oDiv");
function blinkIt(){
var colorArr=["olive","red","green","purple","blue"];
oDiv.style.color=colorArr[Math.round(Math.random()*4)];
}
window.setInterval(blinkIt,100);
</script>
</BODY>
</HTML>
======================================闪烁代码