我不清楚您的问题,但我认为您需要以下内容,您可以使用以下代码检查文档中元素是否存在,然后相应地确定条件。
var date1= document.getElementById('ddldate');
var date2= document.getElementById('ddldate2');
if (date1 && date2)
{
//do your stuff here i.e. hiding datepicker
// document.getElementById("ddldate").style.display = "none";
}
注意:更改表单中提供的元素ID
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句