Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset=utf-8 />
- <title>JS test</title>
- </head>
- <body>
- <input type="text" id="Y" size="20" style="position: absolute; left: 100; top: 100">
- <input type="button" value="A1" name="B3" onclick="a1()">
- <input type="button" value="A2" name="B3" onclick="a2()">
- <input type="button" value="A3" name="B3" onclick="a3()">
- <script>
- window.fy=document.getElementById('Y');
- function a1(){
- fy.value=1;
- }
- function a2(){
- fy.style.left=0;
- }
- function a3(){
- fy.style.top=0;
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment