String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
nbsp;HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
">
My JSP 'allteasort.jsp' starting page <script> <br />var xmlhttp; <br />var spaninnerhtml; <br />var x; <br />var id; <br />function getIE(){ <br /> if(window.XMLHttpRequest){ <br /> xmlhttp=new XMLHttpRequest(); <br /> } <br /> else{ <br /> xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); <br /> } <br /> <br /> <br /> <br />} <br />function getChange(obj){ <br /> <br /> <!--为什么我通过$(x+'n').value获取不到值呢?--> <br /> <br />} <br />function getBack(){ <br /> <br />} <br /> <br /> <br />function tdnchange(obj){ <br /> x = obj; <br /> spaninnerhtml =$(x).innerHTML; <br /> id=x+'n'; <br /> document.getElementById(x).outerHTML="<input id='"+x+'n'+"' type='text' value='"+spaninnerhtml+"' ondblclick='"+getChange(obj)+"'/>"; <br /> <br /> $(x+'n').focus(); <br />} <br />function $(id){ <br /> return document.getElementById(id); <br />} <br /> <br /></script>
茶叶类别id |
茶叶类别名称 |
${temp.tsid} |
${temp.tsname} |
回复讨论(解决方案)
document.getElementById(x).outerHTML="";
id有误,看1楼框得还蛮准的,给1楼好了