此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【skyearthsea】截止到2008-07-01 14:47:09的历史汇总数据(不包括此帖):
发帖数:26                 发帖分:490                
结贴数:25                 结贴分:480                
未结数:1                  未结分:10                 
结贴率:96.15 %            结分率:97.96 %            
值得尊敬

解决方案 »

  1.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    </head><body>
    <input type="text" style="width:40px; height:20px; z-index:1; position:absolute; left:10px; top:10px">
    <div style="position:absolute; left:10px; top:10px; width:60px; height:60px; background-color:#FF0000;filter:alpha(OPACITY =50); z-index:2"></body>
    </html>
      

  2.   

    <html> 
    <head> 
      <title>file只读</title>
      <script type="text/javascript">
       var $=function(strId){ return document.getElementById(strId); }
      </script> 
    </head> 
    <body>  
        <input type="file" id="file1" contenteditable="false"/>  
        <div id="divMask" style="position:absolute;border:1px solid red;"></div>  
        <script>  
           var oFile=$("file1"); 
           var oDiv=$("divMask"); 
           oDiv.style.left=oFile.offsetLeft; 
           oDiv.style.top=oFile.offsetTop; 
           oDiv.style.width=oFile.offsetWidth-70; 
           oDiv.style.height=oFile.offsetHeight; 
         </script> 
    </body> 
    </html>
      

  3.   

    3楼的代码我在csdn里见过 我要的是struts的 <html:file>
      

  4.   

    contenteditable="false" 已经为false了 还用div干什么
      

  5.   

    structs是服务器端技术,<html:file>在客户端还是会转化成<input type="file"/>
    要不你查看一下原文件
    contenteditable="false"是ie支持的属性firefox可不认
      

  6.   

    我当然知道前台是html标签,6楼的你试过struts的<html:file>标签的contenteditable属性吗,加载不了,亲爱的
      

  7.   

    我以为什么大不了的问题呢,就那个啊。
    structs标签是jsptag不可能把所有的html属性都包含进去。不支持就去掉,在客户端用js程序
    的给他加上就可以了,这种做法对于像asp.net 、structs都可以的,别把问题考虑的太死了
    不是把所有问题都考虑用一种办法来解决,服务器端的客户端的都考虑一下,结合起来使用
    <html> 
    <head> 
      <title>file只读</title>
      <script type="text/javascript">
       var $=function(strId){ return document.getElementById(strId); }
      </script> 
    </head> 
    <body>  
        <input type="file" id="file1"/>  
        <div id="divMask" style="position:absolute;border:1px solid red;"></div>  
        <script>  
           var oFile=$("file1"); 
           var oDiv=$("divMask"); 
           oFile.contentEditable=false;
           oDiv.style.left=oFile.offsetLeft; 
           oDiv.style.top=oFile.offsetTop; 
           oDiv.style.width=oFile.offsetWidth-70; 
           oDiv.style.height=oFile.offsetHeight; 
         </script> 
    </body> 
    </html>