Senin, 01 Agustus 2011

Making Form With Javascript

how to make form with javascript, way to make form with javascript, make form with java script, How I can make a form with javascript, how to create a form with javascript, javascript learning guides, give depth to the login form with javascript, javascript tutorials, javascript scripts collection, a collection of tricks and tips javascript for the website, enhance your website with javascript, dialog boxes on the website, create a javascript program for websites
To the bloggers and loyal readers of this website are sorry that lately rarely post .. Haha .. many tasks that had to be resolved. beforehand whether you ever heard of javascript? java script is a kind of Java programs that can be applied on a website or blog that his extension form. js (answer in my opinion) lol ...

Good .. Just go straight to the heart of post title ... ie "tips create a form with javascript" ... we first provide a script javascript then dial in the html code ... The following example ..

<html>
<head>
<script language="JavaScript" type="text/JavaScript">
counter = 0;
function action()
{
counterNext = counter + 1;
document.getElementById("input"+counter).innerHTML = "<p>Masukkan Data <input type='text' name='data[]'></p><div id=\"input"+counterNext+"\"></div>";
counter++;
}
</script>
</head>

<body>
<h1>Dinamic Form</h1>

<form method="post" action="submit.php">
<p>Masukkan Data <input type='text' name='data[]'></p>

<div id="input0">
</div>

<p><a href="javascript:action();">Tambah</a></p>
<p><input type="submit" name="submit" value="Submit"><input type="reset" name="reset" value="Reset"></p>
</form>

</body>
</html>

above code will display the form as follows ...



If the press added will appear as follows:





GOOD LUCK....

Tidak ada komentar:

Posting Komentar