JaveScrip基础

来源:互联网 发布:淘宝衣服一元包邮 编辑:程序博客网 时间:2024/06/03 18:53
<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>
0 0
原创粉丝点击