Greeting, I have this input field <input name="question"/>
I want to call IsEmpty function when submit clicking submit button.
(问候,我有这个输入字段<input name="question"/>
我想在单击提交按钮时调用IsEmpty函数。)
I tried the code below but did not work.
(我尝试了下面的代码,但是没有用。)
any advice?!(有什么建议吗?)
<html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=unicode" /> <meta content="CoffeeCup HTML Editor (www.coffeecup.com)" name="generator" /> </head> <body> <script language="Javascript"> function IsEmpty() { if (document.form.question.value == "") { alert("empty"); } return; } </script> Question: <input name="question" /> <br/> <input id="insert" onclick="IsEmpty();" type="submit" value="Add Question" /> </body> </html>
ask by Eyla translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…