求ASP获取DIV值,在jsxs.asp中如何写代码,谢谢!

<formaction="jsxs.asp"name="ghform"method="post"><tablewidth="800"bordercolor="#FFFF0... <form action="jsxs.asp" name="ghform" method="post">
<table width="800" bordercolor="#FFFF00" height="280" border="1" align="center" cellpadding="0" cellspacing="0" style= "margin:0 ">
<THEAD>
<tr height="30"><th colspan="6" align="center">物质更换记录</th></tr>

<tr height="30">
<th width="35">序号</th>
<th>标准物质名称</th>
<th>规格型号</th>
<th>单位</th>
<th>数量</th>
<th>供应商</th>
</tr>
</THEAD>
<TBODY>
<tr>
<th width="80"><DIV id="id1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 123</DIV> </th>
<th width="200"><DIV id="mc1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 456 </DIV> </th>
<th width="200"><DIV id="xh1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 789</DIV> </th>
<th width="120"><DIV id="dw1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 987</DIV> </th>
<th width="80"><DIV id="sl1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 654 </DIV> </th>
<th width="120"><DIV id="gy1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 432</DIV> </th>
</tr>
</TBODY>
</table>
<p></p>
<p></p>
</table><p align="center"><input type="submit" value="提交" name="Submit" />      
<input type="button" value="关闭" name="close" />
</form>
展开
 我来答
cserwang
推荐于2016-03-13 · TA获得超过1161个赞
知道小有建树答主
回答量:215
采纳率:100%
帮助的人:134万
展开全部
asp是不能直接获取div内容的 不过可以通过js间接过去 代码如下,放到body之间 运行,本人亲测通过
<%
action_get = Request.QueryString("action")

IF action_get = "seeit" Then

Response.Write("序号:"&Request.Form("id")&"<br/>")
Response.Write("标准物质名称:"&Request.Form("mc")&"<br/>")
Response.Write("规格型号:"&Request.Form("xh")&"<br/>")
Response.Write("单位:"&Request.Form("dw")&"<br/>")
Response.Write("数量:"&Request.Form("sl")&"<br/>")
Response.Write("供应商:"&Request.Form("gy")&"<br/>")

End IF
%>
<script language="javascript">
function initData()
{
document.getElementById("id").value=document.getElementById("id1").innerHTML;
document.getElementById("mc").value=document.getElementById("mc1").innerHTML;
document.getElementById("xh").value=document.getElementById("xh1").innerHTML;
document.getElementById("dw").value=document.getElementById("dw1").innerHTML;
document.getElementById("sl").value=document.getElementById("sl1").innerHTML;
document.getElementById("gy").value=document.getElementById("gy1").innerHTML;

return true;
}
</script>
<form action="?action=seeit" name="ghform" method="post" onsubmit="return initData();">
<table width="800" bordercolor="#FFFF00" height="280" border="1" align="center" cellpadding="0" cellspacing="0" style= "margin:0 ">
<THEAD>
<tr height="30"><th colspan="6" align="center">物质更换记录</th></tr>

<tr height="30">
<th width="35">序号</th>
<th>标准物质名称</th>
<th>规格型号</th>
<th>单位</th>
<th>数量</th>
<th>供应商</th>
</tr>
</THEAD>
<TBODY>
<tr>
<th width="80"><DIV id="id1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 123</DIV> </th>
<th width="200"><DIV id="mc1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 456 </DIV> </th>
<th width="200"><DIV id="xh1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 789</DIV> </th>
<th width="120"><DIV id="dw1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 987</DIV> </th>
<th width="80"><DIV id="sl1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 654 </DIV> </th>
<th width="120"><DIV id="gy1" CONTENTEDITABLE STYLE= "height: 100%; width: 100%; "> 432</DIV> </th>
</tr>
</TBODY>
</table>
<input name="id" type="hidden" id="id" value="" />
<input name="mc" type="hidden" id="mc" value="" />
<input name="xh" type="hidden" id="xh" value="" />
<input name="dw" type="hidden" id="dw" value="" />
<input name="sl" type="hidden" id="sl" value="" />
<input name="gy" type="hidden" id="gy" value="" />
<p></p>
<p></p>
</table><p align="center"><input type="submit" value="提交" name="Submit" />
<input type="button" value="关闭" name="close" />
</form>
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
TeacupPoodle
2012-06-20 · TA获得超过101个赞
知道小有建树答主
回答量:219
采纳率:0%
帮助的人:242万
展开全部
不知道你要获取的是什么东西,要的效果是怎么样的,能说详细点嘛?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
404098876
2012-06-14 · 超过23用户采纳过TA的回答
知道答主
回答量:154
采纳率:0%
帮助的人:75.8万
展开全部
通过js获取
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 2条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式