此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【skyearthsea】截止到2008-07-01 14:47:09的历史汇总数据(不包括此帖):
发帖数:26 发帖分:490
结贴数:25 结贴分:480
未结数:1 未结分:10
结贴率:96.15 % 结分率:97.96 %
值得尊敬
楼主【skyearthsea】截止到2008-07-01 14:47:09的历史汇总数据(不包括此帖):
发帖数:26 发帖分:490
结贴数:25 结贴分:480
未结数:1 未结分:10
结贴率:96.15 % 结分率:97.96 %
值得尊敬
<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>
<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>
要不你查看一下原文件
contenteditable="false"是ie支持的属性firefox可不认
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>