如何把javascript的值传给jsp或html 先问下:你的传给 jsp页面是什么意思? 是不是要下面的这样的?"some.jsp?userlang="+userlang还是什么其他的意思? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 页面中方式一:<form name="frmDeleteFile" action ="./AttachFiles.jsp" method="POST" onsubmit="OnDeleteSubmit()"> <input type="hidden" name="sPath" value="<%=sPath%>"> <input type=hidden name="deletefile"> <input type="hidden" name="sFileName" value="<%=sFileName%>"> <table id="filetable" border="1" cellpadding=2 width="240px"> <col><col width="50px"> <tr bgcolor="#F0FAFA"><td>文件名</td><td>删除</td></tr></table></form>页面中方式二:<form name="frmUpLoad" action ="./AttachFiles.jsp?sPath=<%=sPath%>" enctype="multipart/form-data" method="POST">JSP中取参数:String sPath = request.getParameter("sPath"); <script>fuction revalue(){var temp=4;document.kenshin.kname.value=temp;}</script><form name=kenshin ><input type=text name=kname><input type=button vaule=check onclick="revalue()"></form> 对不起,我可能没有说明白,我再说一次,<script language="JavaScript" type="text/javascript">var userlang=navigator.userLanguagealert (userlang)</script>当用户打开这个页面时执行上面的javascript代码,并把值传到html或jsp页面里,这一切都是程序自己完成,不能通过客户onclick或onsubmit提交等相应方式传值希望各位高手给予解答,分不够我再给 再补充一下,我要传出来的是userlang的变量 大家好!想请教大家一个asp.net棘手的一个问题 JavaScript的date问题 js如何替换某个文本域中的值? onUnload 急●●●请教高手如何把此代码应用到PHP中??? 如何在打开网页的同时将连接该网页的快捷方式下载到桌面上? bootstrap怎么使用百度地图api? 自动点击键如何做??如何用javascript改变ie设置? 请问:如何获得<div>的位置(坐标)? 关于js脚本问题。急急急。 页面元素隐藏的问题 谁给我解释这个JS函数
<form name="frmDeleteFile" action ="./AttachFiles.jsp" method="POST" onsubmit="OnDeleteSubmit()">
<input type="hidden" name="sPath" value="<%=sPath%>">
<input type=hidden name="deletefile">
<input type="hidden" name="sFileName" value="<%=sFileName%>">
<table id="filetable" border="1" cellpadding=2 width="240px">
<col><col width="50px">
<tr bgcolor="#F0FAFA"><td>文件名</td><td>删除</td></tr>
</table>
</form>
页面中方式二:
<form name="frmUpLoad" action ="./AttachFiles.jsp?sPath=<%=sPath%>" enctype="multipart/form-data" method="POST">JSP中取参数:
String sPath = request.getParameter("sPath");
fuction revalue()
{
var temp=4;
document.kenshin.kname.value=temp;
}</script>
<form name=kenshin >
<input type=text name=kname>
<input type=button vaule=check onclick="revalue()"></form>
<script language="JavaScript" type="text/javascript">var userlang=navigator.userLanguage
alert (userlang)</script>当用户打开这个页面时执行上面的javascript代码,并把值传到html或jsp页面里,这一切都是程序自己完成,不能通过客户onclick或onsubmit提交等相应方式传值
希望各位高手给予解答,分不够我再给