在div中写入一个Button按钮 (js)

来源:百度知道 编辑:UC知道 时间:2024/09/21 18:40:48

<!--STATUS OK-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>在div中写入一个Button按钮 (js)_百度知道 </title>

<link rel="alternate" type="application/rss+xml" title="“在div中写入一个Button按钮 (js)”的最新回答(RSS 2.0)" href="http://zhidao.baidu.com/q?ct=20&qid=113109049&pn=65535&rn=25&tn=rssqb">

</head>
<body>
<script>

bt=document.createElement("button");
bt.innerHTML="添加一个button";
document.body.appendChild(bt);

</script>
</body>
</html>

<div>