Here is my html code
<form id="form1" runat="server">
<input id="q" required />
<input id="btn" type="submit" value="Search">
</form>
I have used html5 required field validators, it works but with a post back.
so modified the code as follows to avoid postback
<form id="form1" runat="server">
<input id="q" required />
<input id="btn" type="button" value="Search">
</form>
But the required validator doesn't work
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…