Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script>
- function check(myvar){
- var obj=myvar.nextSibling;
- while(obj.nodeType!=1){
- obj=obj.nextSibling;
- }
- obj.innerText=myvar.value;
- }
- </script>
- </head>
- <body>
- <form>
- <?php
- $jml=(isset($jml)?$jml:2);
- echo "<input type='hidden' value='$jml' name='jml' id='jml'/>";
- for($i=0;$i<$jml;$i++){
- echo "<div class='input'>\n"
- ."nim ".($i+1)."<input type='text' name='nim$i' id='nim$i' onblur='check(this);'/>\n"
- ."<div name='hasil' id='hasil'></div>\n"
- ."</div>";
- }
- ?>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement