table中的数据能不能动态的修改? 完全可以,其实用DataGrid不就行了吗,不过一般情况下要刷新页面 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 后台是java做的,还有没有别的方法? JAVA里面没有.NET中那么好用的DataGrid控件,比较麻烦。不过如果没有必要一定这样做,那么可以做成两个页面,一个页面就是前面说的那个列表,另一个页面在点击一条记录后显示详细信息,这个页面使用可编写的控件显示的,这不就解决问题了? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><script language="JavaScript"> function funCgImgTxt(){ var varInt varInt=parseInt(document.all("hidInt").value) if (varInt==0){ document.all("hidInt").value="1" alert("can't edit") document.all("txtHidVis").readOnly=true }else{ if (varInt==1){ document.all("hidInt").value="0" alert("can edit") document.all("txtHidVis").readOnly=false } } }</script><body><table width="820" border="1" cellspacing="0" cellpadding="0" align="center"> <tr> <td height="35" id="id_td1"> </td> </tr> <tr> <td height="35" id="id_td2"><input type=text name=txtHidVis value="1234567890" readonly style="border:none"></td> </tr> <tr> <td height="35" align="center" valign="middle"><p> </p> <p> </p> <p> <input type="button" name="btnChImgTxt" value="ChangeImageText" onClick="funCgImgTxt()" > </p></td> </tr></table><input type="hidde" name="hidInt" value="0">不知是不是你说的那种效果参考一下吧!~</body></html> 是b/s结构的前台是在ie中显示的 jsp or asp or php? <xml id=record><?xml version="1.0"?><root><%ArrayList recordlist = (ArrayList)request.getAttribute("recordlist");//获取数据库记录if(recordlist!=null)for(int i=0;i<recordlist.size();i++){ArrayList temp = (ArrayList)recordlist.get(i);%><record 字段1="<%=temp.get(0)%>" 字段2="<%=temp.get(1)%>"...></recordlist><%}%></root></xml>上面是一个数据岛然后通过javascript显示在一个table中如果提交到数据库的话,数据岛里的数据同步修改就行了。table中实现修改需要写一段javascript代码,我来及写出来,可能要花点时间。如果你自己不能解决,请给我发封邮件:[email protected] js定位符概念 火狐下div移动 弱弱的问一下 不同的窗口访问同一个弹出窗口的问题 iframe 如何用鼠标拖动来改变框的大小? 同一个页面,模式窗口下与非模窗口下的结果不同 关于flash焦点的问题!! 重发!请一定看看!请问如何选择全部表格的内容?请看详细内容 文本框的位置问题 关于层被遮盖的问题 iframe中src的页面刷新的问题!!! 我的代码如下:请指点
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language="JavaScript">
function funCgImgTxt(){
var varInt
varInt=parseInt(document.all("hidInt").value)
if (varInt==0){
document.all("hidInt").value="1"
alert("can't edit")
document.all("txtHidVis").readOnly=true
}else{
if (varInt==1){
document.all("hidInt").value="0"
alert("can edit")
document.all("txtHidVis").readOnly=false
}
}
}
</script><body>
<table width="820" border="1" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="35" id="id_td1"> </td>
</tr>
<tr>
<td height="35" id="id_td2"><input type=text name=txtHidVis value="1234567890" readonly style="border:none"></td>
</tr>
<tr>
<td height="35" align="center" valign="middle"><p> </p>
<p> </p>
<p>
<input type="button" name="btnChImgTxt" value="ChangeImageText" onClick="funCgImgTxt()" >
</p></td>
</tr>
</table>
<input type="hidde" name="hidInt" value="0">
不知是不是你说的那种效果参考一下吧!~
</body>
</html>
前台是在ie中显示的
<?xml version="1.0"?>
<root>
<%
ArrayList recordlist = (ArrayList)request.getAttribute("recordlist");//获取数据库记录
if(recordlist!=null)
for(int i=0;i<recordlist.size();i++)
{
ArrayList temp = (ArrayList)recordlist.get(i);
%>
<record 字段1="<%=temp.get(0)%>" 字段2="<%=temp.get(1)%>"...></recordlist>
<%}%>
</root>
</xml>上面是一个数据岛
然后通过javascript显示在一个table中
如果提交到数据库的话,数据岛里的数据同步修改就行了。
table中实现修改需要写一段javascript代码,我来及写出来,可能要花点时间。
如果你自己不能解决,请给我发封邮件:[email protected]