JaveScrip基础

xiaoxiao2021-02-27  724

<html> <meta charset="UTF-8"> <head> <script> function show(idx){ var obj = document.getElementById(idx); alert(obj.value); } </script> </head> <body> <input type="text" id="user"> <input type="button" value="click me" onclick="show('user')"> </body> </html>
转载请注明原文地址: https://www.6miu.com/read-1077.html

最新回复(0)