本文介绍了如何查找是否已选中复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于检查转发器控件中是否选中此复选框的Javascript ...



我正在使用一个脚本,该脚本在删除"按钮上显示对话框,但在未选中复选框"时显示对话框:|

Javascript to check if checkbox is checked or not in repeater control...



i''m using one script which shows dialoguebox on Delete button but it is showing dialoguebox when Checkbox is not checked :|

<script type="text/javascript">
function Confirmationbox() {
var result = confirm('Are you sure you want to Delete selected Detail(s)?');
if (result) {
return true;
}
else
return false;
}
</script>

推荐答案

if (chk.checked == 1) {
  var result = confirm('Are you sure you want to Delete selected Detail(s)?');
  return result
}


祝你好运!


Good luck!


这篇关于如何查找是否已选中复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-02 01:50