Js添加到HTML

Js添加到HTML

记住document是页面的管理者

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分级标题</title>
</head>

<body>
<p>段落,用于进行排版
    <table border="1" width="80%">
    <tr><td rowspan="3">aaa</td><td colspan="2">aaa</td></tr>
    <tr><td>aaa</td><td>aaa</td></tr>
    <tr><td>aaa</td><td>aaa</td></tr>
     <tr><td>aaa</td><td>aaa</td><td><table border="1"><tr><td>1</td></tr></table></td></tr>
    </table>
</p>

<form action="Untitled-2.html" method="get">
<p>姓名:<input type="text"/></p>
<p>备注:<textarea cols="20" rows="20"></textarea></p>
<p><input type="button" value="测试"/></p>
<p><input type="submit" value="submit"/></p>
<p><input type="reset" value="reset"/></p>
</form>

</body>
</html>

**有两种方式进行网页的跳转:
· 超链接 <a href=””>name</a>
· 表单 <form action = “html” method=“get/post”;**

  1. ·利用js来进行页面动态输入
<script language="javascript" type="text/javascript">
alert("欢迎");
function tt(){
    var i;
    for(i = 0;i<3;i++){
        document.write("aa");
        document.write("<hr/>");
        document.write("BBBBB");
    }
}

</script>

<body>????????Body 中有onload 会影响下面body体中的内容????????
    <form name="myform">
        <input type="text" id="content"/>
        <input type="button" onclick="tt();"/>
    </form>
</body>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值