tes delete
This commit is contained in:
parent
49469b77b4
commit
35acd385b5
34
week 8.html
34
week 8.html
@ -1,34 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script>
|
|
||||||
function tampilkan()
|
|
||||||
{
|
|
||||||
var nama = document.getElementById("nama").values;
|
|
||||||
var umur = document.getElementById("umur").value;
|
|
||||||
document.write(nama);
|
|
||||||
var Hobi = document.getElementByName("hobi");
|
|
||||||
for (let i=0;i<Hobi.length;i++)
|
|
||||||
{
|
|
||||||
if (Hobi(i).hasAttribute("checked")==true)
|
|
||||||
document.write(Hobi[1].value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form method="GET" action="hal.html">
|
|
||||||
Nama : <input type="text" name="nama" id="nama"><br>
|
|
||||||
Umur : <input type="number" name="umur" id="umur"><br>
|
|
||||||
Alamat: <input type="text"><br>
|
|
||||||
Hobi : <input type="checkbox" name="Hobi" value="Baca">Baca
|
|
||||||
<input type="checkbox" name="Hobi" value="Makan">Makan
|
|
||||||
<input type="checkbox" name="Hobi" value="Tidur">Tidur
|
|
||||||
<br><input type="submit" value="kirim dengan GET-Submit">
|
|
||||||
|
|
||||||
<!--<input type="button" value="kirim dengan GET-Button" onclick="window.location.href='hal2.html'">-->
|
|
||||||
<input type="button" value="kirim dengan GET-Button" onclick="tampilkan()">
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user