怎么将javascript的值传给jsp或者form表单?
我是菜鸟,请高手帮帮我!谢谢了!!!
------解决方案--------------------formName.ElementsName/ID.value=JAVASCRIPT_VARS
------解决方案--------------------ls zheng jie
------解决方案-------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<FORM NAME= "myForm " ID= "myForm " METHOD=POST ACTION= "http://www.myurl.com ">
</FORM>
</BODY>
<SCRIPT LANGUAGE= "JavaScript ">
<!--
var newValue = "XXXXXXXXXXXXXXXXXXXXX ";
<!-- 1 -->
//var objF = document.getElementById( "myForm ");
//alert(objF.action);
//objF.action = newValue;
//alert(objF.action);
<!-- 2 -->
alert(myForm.action);
myForm.action = newValue;
alert(myForm.action);
//-->
</SCRIPT>
</HTML>
------解决方案--------------------document.getElementById( "form元素的id ").value = js变量值
------解决方案--------------------..................
<form name=frm>
<input type=hidden name=kkk value= " ">
</form>
..................
<script>
..............
var tempValue= " ";
for(var i=0;i <数组.length;i++)
tempValue=tempValue+数组[i];
document.frm.kkk.value=tempValue;
..............
</script>