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');
}
精彩评论