• 4814阅读
  • 0回复

【原创】使用Javascript控制表单元素是否显示 [复制链接]

上一主题 下一主题
离线XChinux
 

只看楼主 倒序阅读 楼主  发表于: 2005-09-04
如下,可使用style属性的display设置控制是否显示


function changeMessageType(index)
{
    if (document.formGroupmail.messagetype[index].value == 0)
    {
        document.formGroupmail.messagehtml.style.display = "none";
        document.formGroupmail.messagetext.style.display = "";
    }
    else if (document.formGroupmail.messagetype[index].value == 1)
    {
        document.formGroupmail.messagehtml.style.display = "";
        document.formGroupmail.messagetext.style.display = "none";
    }
}
[ 此贴被XChinux在2005-09-04 23:18重新编辑 ]
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
快速回复
限100 字节
 
上一个 下一个