【发布时间】:2013-12-11 06:48:47
【问题描述】:
我从动作发布方法中返回确认。代码正在运行,但当确认到来时我需要关注取消。但总是好的是专注的。我如何解决这个问题
我的代码在下面..
*
<script type="text/javascript">
function confirmation() {
var consumption = document.getElementById("consumption").value;
var texthere1 = document.getElementById("texthere1").value;
var line = document.getElementById("texthere").value;
return confirm("You are about to issue Material <?php echo ltrim($data , "0") ; ?> from 2100/<?php echo ($data2 ) ; ?> To a Dying STO " + texthere1 + " At line " + line + " of " + consumption + " KG. Are You Sure ?") ;
return false;
}
</script>
<form action="a.php" method="post">
<input name="Submit" type="submit" value="Submit" onclick="return confirmation()">
</form>
*
【问题讨论】:
-
我认为您无法对此进行控制,您可以使用 modalpopup insted 并关注它
-
您无法更改浏览器生成对话框的默认行为。您可以使用 js 和 css 创建自己的确认对话框。
标签: javascript onclick confirm