我有这个输入框
<input name="question"/> I want to call IsEmpty function when submit clicking submit button.
我试了下面的代码,但没有工作。 有什么建议吗?
function IsEmpty() {
if (document.form.question.value == "") {
alert("empty");
}
return;
}
Question: <input name="question" /> <br/>
<input id="insert" onclick="IsEmpty();" type="submit" value="Add Question" />