<body>
<input type="text" id="ipt">
<input type="button" id="btn" value="button">
<div id="div1"></div>
<script>
function myFun(){
var ipt = document.getElementById("ipt");
var btn = document.getElementById("btn");
var div1 = document.getElementById("div1");
btn.onclick = function(){
div1.innerHTML = ipt.value;
}
}
myFun();
</script>
</body>
版权属于:
千古互动
本文链接:
http://baota.host/2.html
文章声明:
本文版权内容属于《千古互动》转载请标明出处