对象名修改控件 直接在ul外加个form就是了,干嘛要消失,非要把1+1换算成1+100000*0+1你才高兴啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 看出来了.....这是在类似AJAX那种应用..我去写写看 不用吧...代码:<html><head><meta http-equiv="Content-Language" content="zh-cn" /><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>Test 7 - 原位编辑</title><script type="text/javascript">// Code by Hidden, Inner Group (CSDN: gladisionboy)var formnode=null;var prevEdit=null;window.onload=function () { formnode=ajaxList_post.removeNode(true); formnode.onsubmit=onaftereditinplace; formnode.style.display="inline"; for(var i=0; i<ajaxList.childNodes.length; i++) { ajaxList.childNodes[i].childNodes[0].onclick=onbeforeeditinplace; } }function onbeforeeditinplace() { if(prevEdit) return false; var a=event.srcElement; a.style.display="none"; a.insertAdjacentElement("afterend", formnode); ajaxList_post.ajax_value.value=a.innerHTML; prevEdit=a; return false;}function onaftereditinplace() { var a=ajaxList_post.previousSibling; a.innerHTML=ajaxList_post.ajax_value.value; formnode=ajaxList_post.removeNode(true); a.style.display=""; prevEdit=null; return false;}</script></head><body><form name="ajaxList_post" method="GET" style="display: none;"> <input type="text" size="40" value="" name="ajax_value" /> <input type="submit" value="修改" /></form><ul id="ajaxList"><li><a href="#">a</a></li><li><a href="#">b</a></li><li><a href="#">c</a></li><li><a href="#">d</a></li><li><a href="#">e</a></li></ul></body></html> jQuery 与 IE8 的问题 ! ! ! Js 如何让时间相加? 如何设置js 有规律的访问flash 关于表单中“ 提交” “预览” 按钮的制作 ◆◆ document.write错误,在线等待 ◆◆ 超连接问题 求教一个正则表达式的函数?页面上只能输入字母和数字? 树型结构的显示问题 函数参数问题 我在要客户端验证用户输入是不是一个时间的函数怎么写?象(10:23:12) javascript問題 谁有JS的函数大全啊??
我去写写看
代码:
<html><head>
<meta http-equiv="Content-Language" content="zh-cn" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Test 7 - 原位编辑</title>
<script type="text/javascript">
// Code by Hidden, Inner Group (CSDN: gladisionboy)
var formnode=null;
var prevEdit=null;window.onload=function () {
formnode=ajaxList_post.removeNode(true);
formnode.onsubmit=onaftereditinplace;
formnode.style.display="inline"; for(var i=0; i<ajaxList.childNodes.length; i++) {
ajaxList.childNodes[i].childNodes[0].onclick=onbeforeeditinplace;
}
}function onbeforeeditinplace() {
if(prevEdit)
return false;
var a=event.srcElement;
a.style.display="none";
a.insertAdjacentElement("afterend", formnode);
ajaxList_post.ajax_value.value=a.innerHTML;
prevEdit=a;
return false;
}function onaftereditinplace() {
var a=ajaxList_post.previousSibling;
a.innerHTML=ajaxList_post.ajax_value.value;
formnode=ajaxList_post.removeNode(true);
a.style.display="";
prevEdit=null;
return false;
}</script>
</head><body>
<form name="ajaxList_post" method="GET" style="display: none;">
<input type="text" size="40" value="" name="ajax_value" />
<input type="submit" value="修改" />
</form><ul id="ajaxList">
<li><a href="#">a</a></li>
<li><a href="#">b</a></li>
<li><a href="#">c</a></li>
<li><a href="#">d</a></li>
<li><a href="#">e</a></li>
</ul>
</body></html>