代码如下:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->if("periodPerMonth" in document.theForm)
{
return true;
}
else{
return false;
}
代码如下:
if(document.getElementById("XXX"))
{
//存在
}
代码如下:
if(document.theForm.periodPerMonth)
{
//存在
}或
if(typeof(document.theForm.periodPerMonth)=="object")
{
//存在
}
代码如下:
if(document.theForm)
{
//存在
}
代码如下:
if ( $("#someID").length > 0 ) {
$("#someID").text("hi");
}