tambc

BlogJava 首页 新随笔 联系 聚合 管理
  5 Posts :: 21 Stories :: 5 Comments :: 0 Trackbacks
 1 < head >  
 2 < style >  
 3 * { font-size : 12px ; cursor : default }  
 4 .hand { cursor : hand ; cursor : pointer }  
 5
</ style >  
 6 </ head >  
 7
 8 < body >  
 9 < form  name =fm1 >  
10 < div  id =bxAttList >  
11    < div  id =bxAtt  onmouseover ="$(’bxAtt1’).style.textDecoration=’underline’"  onmouseout ="$(’bxAtt1’).style.textDecoration=’’"  style =float:left;width:60 >  
12      < span  id =bxAtt1  style =’position:absolute;padding-top:3;cursor:hand;font-family:宋体’ > @添加附件 </ span >  
13      < span  id =bxAtt2  onmouseover =this.scrollLeft=100  style =position:absolute;width:60;overflow:hidden;filter:alpha(opacity=0);-moz-opacity:0 ></ span >  
14    </ div >  
15 </ div >  
16 </ form >  
17 </ body >  
18 < script >  
19 file_create() 
20 function  file_create()
21   $( " bxAtt2 " ).innerHTML = " <input onchange=file_change(this) hidefocus type=file name=file1 size=1 class=hand> "  
22 }
 
23 function  file_change(tx)
24    var  sName,o 
25   sName = tx.value.replace( / \\ / g, " / " ).replace( / (. * \ / )(. * ) / , " $2 "
26   o = document.createElement( " nobr "
27   o.style.cssText = " float:left;margin-right:6;padding-top:3;color:darkgreen "  
28   o.innerHTML = " " + sName + " <font onclick=$(’bxAttList’).removeChild(this.parentNode);file_repos() class=hand style=color:red;font-weight:bold> " + unescape( " %d7 " ) + " </font> "  
29   tx.style.display = " none "  
30   o.appendChild(tx) 
31   $( " bxAttList " ).insertBefore(o,$( " bxAtt " )) 
32   file_repos() 
33   file_create() 
34 }
 
35 function  file_repos()
36   $( " bxAttList " ).appendChild($( " bxAtt " )) 
37 }
 
38 function  $(obj)
39    return   typeof (obj) == " object " ? obj:document.getElementById(obj) 
40 }
 
41
</ script >
posted on 2006-12-21 11:41 tambc 阅读(474) 评论(0)  编辑  收藏 所属分类: JavaScript

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


网站导航: