更新时间: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);