首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

请大家来解答,该怎么解决

2012-03-07 
请大家来解答界面上有二个dropdownlist控件,dropdownlist1和dropdownlist2和一个文本框控件text1,想用java

请大家来解答
界面上有二个dropdownlist控件,dropdownlist1和dropdownlist2和一个文本框控件
text1,想用javascrip来判断如果两个   dopdownlist控件的selectedItem.value= "-1 "和text1.value的值为空时弹出提示框来提示请把内容填写完整.
应该怎样实现恳请高手帮忙

[解决办法]
if(document.getElementById( "dropdownlist1 ").value == "-1 "||document.getElementById( "dropdownlist2 ").value == "-1 "||document.getElementById( "Text1 ").value == " "){ alert( "请输入完整! ");return false;}
[解决办法]
if(document.getElementById( "class ").value== "-1 ")
{
alert( "Please select class! ");
document.getElementById( "class ").focus();
}

if (document.getElementById( "shijian ").value== "-1 ")
{
alert( "Please select time! ");
document.getElementById( "shijian ").focus();
}

if (document.getElementById( "xingming ").value== " ")
{
alert( "Please input name! ");
document.getElementById( "xingming ").focus();
}

热点排行