scriptwelt.org das JavaScript Archiv

Navigation
Startseite
Audio & Sound
Formulare
Cookies
Fenster & Frame
Grafik & Text
Navigation
Suche Scripts
Fun und Spiele
Buttons
Diverse
Tutorials

Kontakt
eine Mail an ScriptWelt.org
Webhosting
Tipps zur Providerwahl und zum Webspace

JavaScript in eine HTML Datei einbinden

Sind JavaScripts sicher?

Links zum Thema JavaSript

Impressum
impressum

Formulare JavaScript / Abfrage vor Eingabe des Formulars

Dieses JavaScript erzeugt eine Sicherheitsabfrage vor dem Eingeben der Daten einen Klick in eine Checkbox verlangt.
Autor: unbekannt
Demo :

To accept the license terms for posting, click the checkbox:
I Accept

Name:
E-Mail:
Post:

in <head> zufügen

<script type="text/javascript">
http://www.scriptwelt.org
<!--
function confirmReset (form)
{
if (confirm("Alle Inhalte des Formulars loeschen?"))
{
return true;
}
else
{
return false;
}
}
// -->
</script>

in <body> einfügen


<form name="myform">
<p>To accept the license terms for posting, click the checkbox:<br>
<input type="checkbox" name="mycheck" onclick="toggleform('document.myform','mycheck','pname,pemail,ptext')"> I Accept</p>
<table>
<tr>
<td><b>Name:</b></td><td><input type="textbox" id="pname" name="pname" disabled="true"></td>
</tr><tr>
<td><b>E-Mail:</b></td><td><input type="textbox" name="pemail" disabled="true"></td>
</tr><tr>
<td><b>Post:</b></td><td><textarea name="ptext" disabled="true"></textarea></td>
</tr>
</table>
</form>