<!-- google_ad_client = "pub-4490194096475053"; /* 内容页,300x250,第一屏 */ google_ad_slot = "3685991503"; google_ad_width = 300; google_ad_height = 250; // -->
//1.判断select选项中 是否存在Value="paraValue"的Item
function jsSelectIsExitItem(objSelect,objItemValue)
{
var isExit = false;
for(var i=0;i<objSelect.options.length;i++)
{
if(objSelect.options[i].value == objItemValue)
{
isExit = true;
break;
}
}
return isExit;
}
本文介绍了一个用于检查 Select 控件中是否存在特定 Value 的 JavaScript 函数。该函数通过遍历 Select 控件的所有选项来判断是否有匹配的 Value 值。
359

被折叠的 条评论
为什么被折叠?



