Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想验证该文本框是否为空,它应该给出“文本框不能为空”的警报消息
我已经搜索过这个网站,但我没有得到任何满意的答案。请帮忙
提前致谢。
调用这个函数
function validate(){ var textbox=documnet.getElementById('textboxid'); if(textbox.value=="" ||textbox.value==null){ alert("textbox cannot be empty"); } }