div中的服务器控件不能输入。

心灵彩虹 2011-02-24 10:52:08
<div id="fd" style="display:none;filter:alpha(opacity=100);opacity:1;>
<div class="content">

<asp:Panel ID="panel3" Style="z-index: 103; left: 20px; position: absolute; top: 50px;
width: 666px; height: 110px;" runat="server">
<asp:Label ID="flblITEM_NO2" Style="left: 8px; position: absolute; top: 10px" runat="server"
Width="80px" CssClass="fi_mtitle">品目コード</asp:Label>
<%--<asp:TextBox ID="txtITEM_NO2" Style="left: 90px; position: absolute; top: 10px; width: 150px;
height: 17px;" runat="server" MaxLength="20" CssClass="text_input_left_key" TabIndex="1"></asp:TextBox>--%>
<asp:TextBox ID="txtITEM_NO2" Style="left: 90px; position: absolute; top: 10px; width: 150px;
height: 17px;" runat="server" MaxLength="20" CssClass="text_input_left_key" TabIndex="1"></asp:TextBox>
<img id="imgItem" style="z-index: 107; position: absolute; top: 10px; left: 249px;"
src="../../Contents/Image/BackGround/sbtn_srch.gif" runat="server" alt="" />
<asp:TextBox ID="lblITEM_DESC2" runat="server" Style="left: 285px; position: absolute;
top: 10px; width: 315px; height: 17px;" BackColor="#CCCCCC" CssClass="d_label"
ReadOnly="true" TabIndex="-1" BorderWidth="1px"></asp:TextBox>
<asp:Label ID="flblINPUT_QTY" runat="server" CssClass="fi_mtitle" Style="left: 8px;
position: absolute; top: 35px" Width="80px">投入数</asp:Label>
<cc1:NumberBox ID="txtINPUT_QTY" runat="server" Style="left: 90px; position: absolute;
top: 35px; width: 100px; height: 17px; text-align: right" CssClass="text_input_right_key"
DecimalPlaces="2" MaxLength="12" TabIndex="2"></cc1:NumberBox>
</asp:Panel>
<%-- </asp:Panel>--%>
</div>
</div>
上面的代码中,为什么textbox不能输入了?我是用javascript弹出这个层的。
js如下:

<script type="text/javascript">
var prox;
var proy;
var proxc;
var proyc;
function show(id) {/*--打?--*/
clearInterval(prox);
clearInterval(proy);
clearInterval(proxc);
clearInterval(proyc);
var o = document.getElementById(id);
o.style.display = "block";
o.style.width = "1px";
o.style.height = "1px";
prox = setInterval(function() { openx(o, 700) }, 10);
}
function openx(o, x) {/*--打?x--*/
var cx = parseInt(o.style.width);
if (cx < x) {
o.style.width = (cx + Math.ceil((x - cx) / 5)) + "px";
}
else {
clearInterval(prox);
proy = setInterval(function() { openy(o, 200) }, 10);
}
}
function openy(o, y) {/*--打?y--*/
var cy = parseInt(o.style.height);
if (cy < y) {
o.style.height = (cy + Math.ceil((y - cy) / 5)) + "px";
}
else {
clearInterval(proy);
}
}
function closeed(id) {/*--??--*/
clearInterval(prox);
clearInterval(proy);
clearInterval(proxc);
clearInterval(proyc);
var o = document.getElementById(id);
if (o.style.display == "block") {
proyc = setInterval(function() { closey(o) }, 10);
}
}
function closey(o) {/*--打?y--*/
var cy = parseInt(o.style.height);
if (cy > 0) {
o.style.height = (cy - Math.ceil(cy / 5)) + "px";
}
else {
clearInterval(proyc);
proxc = setInterval(function() { closex(o) }, 10);
}
}
function closex(o) {/*--打?x--*/
var cx = parseInt(o.style.width);
if (cx > 0) {
o.style.width = (cx - Math.ceil(cx / 5)) + "px";
}
else {
clearInterval(proxc);
o.style.display = "none";
}
}

var od = document.getElementById("fd");
var dx, dy, mx, my, mouseD;
var odrag;
var isIE = document.all ? true : false;
document.onmousedown = function(e) {
var e = e ? e : event;
if (e.button == (document.all ? 1 : 0)) {
mouseD = true;
}
}
document.onmouseup = function() {
mouseD = false;
odrag = "";
if (isIE) {
od.releaseCapture();
od.filters.alpha.opacity = 100;
}
else {
window.releaseEvents(od.MOUSEMOVE);
od.style.opacity = 1;
}
}


//function readyMove(e){
od.onmousedown = function(e) {
odrag = this;
var e = e ? e : event;
if (e.button == (document.all ? 1 : 0)) {
mx = e.clientX;
my = e.clientY;
od.style.left = od.offsetLeft + "px";
od.style.top = od.offsetTop + "px";
if (isIE) {
od.setCapture();
od.filters.alpha.opacity = 50;
}
else {
window.captureEvents(Event.MOUSEMOVE);
od.style.opacity = 0.5;
}

//alert(mx);
//alert(my);

}
}
document.onmousemove = function(e) {
var e = e ? e : event;

//alert(mrx);
//alert(e.button);
if (mouseD == true && odrag) {
var mrx = e.clientX - mx;
var mry = e.clientY - my;
od.style.left = parseInt(od.style.left) + mrx + "px";
od.style.top = parseInt(od.style.top) + mry + "px";
mx = e.clientX;
my = e.clientY;

}
}
function showBackground(obj, endInt) {
obj.filters.alpha.opacity += 1;
if (obj.filters.alpha.opacity < endInt) {
setTimeout(function() { showBackground(obj, endInt) }, 8);
}
}



</script>
...全文
77 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
路伊阑珊 2011-04-26
  • 打赏
  • 举报
回复
检查你的代码 可以的 应该是你的代码出现问题
蓝天_野菜 2011-04-26
  • 打赏
  • 举报
回复
Lable控件 不能至于<div>中
今天无意间发现的、

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧