码迷,mamicode.com
首页 > Web开发 > 详细

jquery 添加html标签

时间:2014-05-23 10:45:01      阅读:359      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   c   code   java   

 

 

bubuko.com,布布扣
<script type="text/javascript">
        var sss = 1;
        function addFile() {
            if (sss < 20) {
                var str =  <span id = row + sss + ><br/><INPUT type="file" style="WIDTH: 222px; HEIGHT: 20px" size="50" NAME="File">&nbsp;<span style="line-height:25px;">文件说明:<input type="text" id="pic + sss + " name="pic + sss + " value="" style="WIDTH: 322px; HEIGHT: 20px" size="50"   /><a href="#" onclick=deleteRow(row + sss + )>删除<a/></span>;
                document.getElementById(P1).insertAdjacentHTML("beforeEnd", str);
            }
            else {
                alert("您一次最多只能上传20个文件!");
            }
            sss++;
        }

        function deleteRow(e) {
            //alert("成功删除第" + e + "行");
            var obj = document.getElementById(e.id);
            //    obj.removeNode(e);
            obj.remove(e);
            sss--;
        }

    </script>
View Code

 

bubuko.com,布布扣
 1 <style type="text/css">
 2         .isbnt
 3         {
 4             float: left;
 5             margin-left: 10px;
 6         }
 7         .bnt
 8         {
 9             margin: 0 auto;
10             width: 500px;
11             height: 20px;
12         }
13     </style>
View Code

 

 

 

       <tr>
                    <th>
                        文 件:
                    </th>
                    <td colspan="5">
                        <p id="P1">
                            <input id="file" style="width: 222px;" type="file" size="42" name="File1" runat="server" />
                            <span>文件说明:
                                <input type="text" id="pic0" name="pic0" value="" style="width: 322px;" size="50" /></span>
                        </p>
                        <input type="button" value="继续上传" onclick="addFile()" style="width: 69px; height: 20px" />
                    </td>
                </tr>

 

 

 

 

jquery 添加html标签,布布扣,bubuko.com

jquery 添加html标签

标签:style   class   blog   c   code   java   

原文地址:http://www.cnblogs.com/chenghu/p/3737381.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!