Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Source Code JavaScript</title>
- <script type="text/javascript">
- window.onload=function()
- {
- /*
- login: Nama form
- username : nama elemen input
- pass: nama elemen input
- */
- var username=document.login.username;
- var pass=document.login.pass;
- username.onkeyup=function()
- {
- //hasil : nama form
- //user : id elemen
- document.hasil.user.value=username.value;
- }
- pass.onkeyup=function()
- {
- //pass : id elemen
- document.hasil.pass.value=pass.value;
- }
- }
- </script>
- </head>
- <body>
- <form name="login">
- <input name="username" type="text">
- <input name="pass" type="password">
- </form>
- <br>
- <form name="hasil">
- <input id="user" type="text">
- <input id="pass" type="text">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement