1. Link zu einer Seite
<input type="button" name="Submit" value="OK"
onclick="location.href='filename.html'" />
2. Rückkehr (entspricht Rückzug)
<input name="Submit2" type="button"
onclick="location.href='javascript:history.go(-1);'" value="Return" />
3. Öffnen Sie eine neue Webseite
<input type="button" name="Submit2" value="OK"
onclick="window.open('filename.html')" />
4. Öffnen Sie ein neues Fenster ohne Rahmen
<input type="button" name="Submit2" value="OK" onclick="javascript:window.open('filename.html','','width=720,height=500,resizable=yes,scrollbars= ja,status=nein')" />
5. Öffnen Sie eine neue Webseite, während Sie auf eine andere Seite zeigen
<input type="button" name="Submit2" value="OK" onclick="window.open('filename.html');location.href='http://www.cxybl.com'" />
6. Öffnen Sie ein neues Fenster ohne Rahmen, während Sie auf eine andere Seite zeigen
<input type="button" name="Submit2" value="OK" onclick="javascript:window.open('http://www.cxybl.com','','width=720,height=500, resizable=yes,scrollbars=yes,status=no'); window.location='filename.html';" />
7. Klicken Sie auf die Schaltfläche, um das Bestätigungsalarmfenster aufzurufen.
Methode eins:
<input type="button" name="Submit1" value="OK"
onClick="alert('Einreichung bestätigen?');location.href= 'filename.html';return false;"
Methode zwei:
<input type="button" name="Submit2" value="OK"
onClick="if (confirm('Einreichung bestätigen?'))location.href= 'filename.html';return false;"