且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用于检查网页中文本框是否为空的Java脚本.

更新时间:2023-11-28 16:46:16

Sample JavaScript to validate the text box is empty or not:
if (document.getElementById('txtName').value=='')
{}



dropdown list select is empty or not:

<select>
<option selected value="123">123</option>
<option value="234">234</option>
</select>



var hasValue = (


('select > [selected]').length > 0);