Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
window.onload = function() {
document.getElementById("loeschButton").onclick = function() {
return confirm("Wirklich löschen?");
}
}
<script type="text/javascript">
window.onload = function()
{
document.getElementById("loeschen").onclick = function()
{
return confirm("Löschen Ja nein?");
}
}
</script>
<html>
<head>
<script type="text/javascript">
window.onload = function()
{
document.getElementById("loeschen").onclick = function()
{
return confirm("Löschen");
}
}
</script>
</head>
<body>
<form action="test.html" method="get">
<input type="hidden" name="loose" value="ja" />
<input type="submit" id="loeschen">
</form>
</body>
</html>
document.getElementsByTagName("form")[0].onsubmit = function() {return confirm("Löschen?");}
Würde eher mitarbeiten. Denn ich habe gehört, dass wenn man in einigen Browsern den Button mit der Tastatur validiert, dass nicht funktioniert.Code:document.getElementsByTagName("form")[0].onsubmit = function() {return confirm("Löschen?");}
Außerdem ist es falsch zu sagen, dass <script> in <head> kommen muss.