开发者

client side confirmation popup in html quickform

I am using html quickforms and php. I have a form. When a field value exceeds 200 and he clicks sub开发者_运维技巧mit i want to show a popup confirmation box, how do i do this ?


You need JavaScript for popup confirmation box.

something like this jsfiddle:

html:

<input type='text' name='data' id='data' />
<div id='click' onclick="checkVal();">Click Me</div>

JavaScript:

function checkVal() {
    if (parseInt(document.getElementById('data').value, 10) > 200) alert('exeeds 200');
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜