点击页面出现文本框,请问要如何实现? <input type=text style="border:0px solid" value="结果"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不是啊 我希望是这种样式。http://211.144.100.243:8080/extrasample/firstpage/simplescript/simplescript.jsp 结果:<div id="aa" onclick="click1()"></div><script>aa.innerHTML="AA"function click1(){ aa.innerHTML="<input type=text onblur=result() name=txt1>" }function result1(){ aa.innerHTML=document.all.txt1.value;}</script> <div id=Layer1 style="border:1px solid; Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute; BACKGROUND-COLOR: #eeeeee" > <input id=text1 style="border:1px solid"> <INPUT type="button" value="确定" onclick="eee();" style="border:1px solid; HEIGHT: 20px"> </div><TABLE WIDTH=200 border="1" cellpadding="0" cellspacing="0" bordercolor="#eeeeee" onclick="aaa();" onmouseover="bbb();" onmouseout="ccc();"> <TR> <TD >11</TD> <TD >12</TD> </TR> <TR> <TD >21</TD> <TD >22</TD> </TR></TABLE><SCRIPT > var obj; function aaa() { obj=window.event.srcElement; Layer1.style.visibility="visible"; Layer1.style.top=window.event.srcElement.offsetTop + 40; Layer1.style.left=window.event.srcElement.offsetLeft+10; text1.value=obj.innerText; text1.focus(); } function bbb() { window.event.srcElement.borderColor="#FF0000"; } function ccc() { window.event.srcElement.borderColor="#eeeeee"; } function eee() { if(obj=="[object]") { obj.innerText=text1.value; Layer1.style.visibility="hidden"; } }</SCRIPT> 你给那个页面看不了,我刚才做的这个也很酷的。http://expert.csdn.net/Expert/topic/3045/3045190.xml?temp=.8887903 谢谢,就是这种样子。如果想在<TD >11</TD>上直接做修改(出现修改文本框),那要怎么改呢? 你在<TD > <input value="11" style="OVERFLOW: visible border-width:0px;border:0px;"></TD>就可以直接修改了。value="11"是从服务器写来的 有千分位的js相加 js控制A标签样式问题,请教! JS获取当前年份出现错误??? vml的问题 相信你绝对没遇到过 JS问题在线=解答 Vbscript超难问题,关于框架的. 请教一个正反斜杠字符串转换的问题 ★★★超难问题,如何实现带checkbox的树状菜单★★★ 怎么写交换数组元素的函数呀? 请问有没有检查网站上没有用到的文件,并把他删除的工具? 请高手看一看QQ下拉菜单的代码,为何有的机子显示正常,而有的机子会出现异常?(很急!) 请问如何用JS取得文本框的值!
<script>
aa.innerHTML="AA"
function click1()
{
aa.innerHTML="<input type=text onblur=result() name=txt1>"
}
function result1()
{
aa.innerHTML=document.all.txt1.value;
}
</script>
style="border:1px solid; Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute; BACKGROUND-COLOR: #eeeeee"
>
<input id=text1 style="border:1px solid">
<INPUT type="button" value="确定" onclick="eee();" style="border:1px solid; HEIGHT: 20px">
</div>
<TABLE
WIDTH=200
border="1"
cellpadding="0"
cellspacing="0"
bordercolor="#eeeeee"
onclick="aaa();"
onmouseover="bbb();"
onmouseout="ccc();">
<TR>
<TD >11</TD>
<TD >12</TD>
</TR>
<TR>
<TD >21</TD>
<TD >22</TD>
</TR>
</TABLE>
<SCRIPT >
var obj;
function aaa()
{
obj=window.event.srcElement;
Layer1.style.visibility="visible";
Layer1.style.top=window.event.srcElement.offsetTop + 40;
Layer1.style.left=window.event.srcElement.offsetLeft+10;
text1.value=obj.innerText;
text1.focus();
}
function bbb()
{
window.event.srcElement.borderColor="#FF0000";
}
function ccc()
{
window.event.srcElement.borderColor="#eeeeee";
}
function eee()
{
if(obj=="[object]")
{
obj.innerText=text1.value;
Layer1.style.visibility="hidden";
}
}
</SCRIPT>
http://expert.csdn.net/Expert/topic/3045/3045190.xml?temp=.8887903
<TD >
<input value="11" style="OVERFLOW: visible border-width:0px;border:0px;">
</TD>
就可以直接修改了。
value="11"是从服务器写来的