js控制fieldset高度
<script language="JavaScript">
<!--
function admin_Size(num,objname)
{
var obj=document.getElementById(objname);
if (parseInt(obj.style.height)+num>=50) {
obj.style.height = parseInt(obj.style.height) + num;
}
if (num>0)
{
obj.width="90%";
}
}
//-->
</script>
<fieldset name="ArticleIntro" ID="ArticleIntro" style="width:234px;height:100px;text-align:center;color:deeppink;"><legend style="font-weight:800;">不是太熟悉</legend>就要去学习</fieldset><br>
<a href="javascript:admin_Size(-50,'ArticleIntro')">减小</a>
<a href="javascript:admin_Size(50,'ArticleIntro')">增加</a>
<!--
function admin_Size(num,objname)
{
var obj=document.getElementById(objname);
if (parseInt(obj.style.height)+num>=50) {
obj.style.height = parseInt(obj.style.height) + num;
}
if (num>0)
{
obj.width="90%";
}
}
//-->
</script>
<fieldset name="ArticleIntro" ID="ArticleIntro" style="width:234px;height:100px;text-align:center;color:deeppink;"><legend style="font-weight:800;">不是太熟悉</legend>就要去学习</fieldset><br>
<a href="javascript:admin_Size(-50,'ArticleIntro')">减小</a>
<a href="javascript:admin_Size(50,'ArticleIntro')">增加</a>
版权声明:
作者:Kiyo
链接:https://www.wkiyo.cn/html/2008-01/i527.html
来源:Kiyo's space
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论