Thinking

快乐编程,开心生活
posts - 21, comments - 27, trackbacks - 0, articles - -5
  语源科技BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

动态增加文件上传选择框

Posted on 2007-02-06 17:17 lixw 阅读(454) 评论(0)  编辑  收藏
 1 < script language = " javascript " >  
 2 // 行追加 
 3 function  lineAdd() 
 4 { 
 5 var  count  =   1 ; 
 6 var  newLine_1  =   " <tr> "  
 7 newLine_1  +=   " <td><input type='file' size='30' name='uploadfile "   +  count  +   " '></td> " ; 
 8 count ++ ; 
 9 newLine_1  +=   " <td><input type='button' value='删除' style='cursor:hand' onClick='lineDel(this)'></td> " ; 
10 newLine_1  +=   " </tr> " ; 
11
12 var  tmp  =   "" ; 
13 tmp  =   " <table id='D1'> " ; 
14 tmp  +=  D1.innerHTML; 
15 tmp  +=  newLine_1; 
16 tmp  +=   " </table> " ; 
17 D1.outerHTML  =  tmp; 
18 }
 
19
20 // 行删除 
21 function  lineDel(btn) 
22 { 
23 D1.deleteRow(btn.parentNode.parentNode.rowIndex); 
24 }
 
25
26 </ script >

只有注册用户登录后才能发表评论。


网站导航: