<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function chengmix()
{
var divNode=document.getElementById("newsid");//这里的newsid能不能替换成 div??下面的程序用的就是div。红色部分,为什么呢??
divNode.style.fontSize="9px";
}
</script>
</style>
</hea>
<body>
<h2>行文表帝国</h2>
<a href="javascript:void(0)">大</a>
<a href="javascript:void(0)">中</a>
<a href="javascript:void(0)">小</a></br>
<div id="newsid" >
了解到了古拉感觉了卡机了肯德基弗兰克的法拉发了卡机发了发了狂法
兰克福
了解到了古拉感觉了卡机了肯德基弗兰克的法拉发了卡机发了发了狂法
兰克福
</body>
</html>
---------------------------------------------------------------------------------
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="dao.js"></script>
<script type="text/javascript">
function change()
{
var divNode=byTag("div")[0];
}
</script>
</head>
<body>
<div style="overflow:hidden; height:8px "onclick="change()">
案件发了快放假了房间里
</div>
</body>
</html>
|