webcode 发表于 2013-2-7 19:55:31

js判断select列表值的函数

//1.判断select选项中 是否存在Value="paraValue"的Item
function jsSelectIsExitItem(objSelect,objItemValue)
{
var isExit = false;
for(var i=0;i<objSelect.options.length;i++)
{
if(objSelect.options.value == objItemValue)
{
isExit = true;
break;
}
}
return isExit;
}
http://www.corange.cn/archives/2008/10/2113.html
页: [1]
查看完整版本: js判断select列表值的函数