document.stylesheets的removerule方法
对于document.stylesheets的remove方法不了解,下面这程序不能删除样式表规则?<html>
<head>
<title>无标题文档</title>
<style>p.p1{ background-color:#FF0000;font-size:22px;_
font-family:"方正舒体"; font-weight:100; }</style>
<script language="vbscript">
sub remove()
{
document.stylesheets[0].removerule 0
}
end sub
</script></head>
<body><p class=p2 style=" background-color:#FF0000;font-size:22px; font-family:"方正舒体"; font-weight:100;"> hello,this is a example of stylesheets</p>
<form>
<input type="button" value="按我取消下行背景设置" onClick="remove()">
<p class=p1> hello,this is a example of stylesheets</p>
</body>
</html>
[此贴子已经被作者于2007-10-10 14:50:29编辑过]