使用javascript查找html控件类型 [英] Find html control types using javascript
本文介绍了使用javascript查找html控件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在页面中找到html控件类型并基于此进行验证.
Hi,
Have find html controls types in page and validate based on that.
How to find a control as dropdownlist using javascript?
推荐答案
使用document.getElementById(''dropdownId'')
您可以在Google中找到许多示例...
Use document.getElementById(''dropdownId'')
U can found many samples in google...
var ddl = document.getElementById('ddlId');
if(ddl.type == 'select')
{
//your validation
}
这篇关于使用javascript查找html控件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文