CSS样式上传域的美化

<style>
*{font-size:12px;cursor:default}
.hand{cursor:hand;cursor:pointer}
</style>
<body>
<form name=fm1>
<div id=bxAttList>
    <div id=bxAtt οnmοuseοver="$('bxAtt1').style.textDecoration='underline'" οnmοuseοut="$('bxAtt1').style.textDecoration=''" style=float:left;width:60>
        <span id=bxAtt1 style='position:absolute;padding-top:3;cursor:hand;font-family:宋体'>@添加附件</span>
        <span id=bxAtt2 οnmοuseοver=this.scrollLeft=100 style=position:absolute;width:60;overflow:hidden;filter:alpha(opacity=0);-moz-opacity:0></span>
    </div>
</div>
</form>
</body>
<script>
file_create()
function file_create(){
    $("bxAtt2").innerHTML="<input οnchange=file_change(this) hidefocus type=file name=file1 size=1 class=hand>"
}
function file_change(tx){
    var sName,o
    sName=tx.value.replace(g,"/").replace(/(.*//)(.*)/,"$2")
    o=document.createElement("nobr")
    o.style.cssText="float:left;margin-right:6;padding-top:3;color:darkgreen"
    o.innerHTML="□"+sName+"<font οnclick=$('bxAttList').removeChild(this.parentNode);file_repos() class=hand style=color:red;font-weight:bold>"+unescape("×")+"</font>"
    tx.style.display="none"
    o.appendChild(tx)
    $("bxAttList").insertBefore(o,$("bxAtt"))
    file_repos()
    file_create()
}
function file_repos(){
    $("bxAttList").appendChild($("bxAtt"))
}
function $(obj){
    return typeof(obj)=="object"?obj:document.getElementById(obj)
}
</script>
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值