i make return confirm from from post post method. Код работает, но мне нужно сфокусироваться Отмена при подтверждении. Но всегда хорошо сфокусировано. Как я решить этот вопросjavascript onclick cancel focus
мой код ниже ..
*
<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. – bnuhero