我的问题是,如何确定用户是否按下“是”或“否”这是一个 html
<form id="delFrm" method="post">
<label>Do you want delete?</label>
<input type="submit" name="yes" id="yes" value="yes" />
<input type="submit" name="no" id="no" value="no" />
</form>
这里是 jquery/js
<script type="text/javascript">
$(document).ready(function() {
$('#delFrm').submit(function(){
var yes = true;//how to define it??????
if(yes) {
//sent ajax to delete the data
} else {
//close close the form on a fancybox
}
return false;
});
});
</script>
谢谢