在下面form
,我需要将值作为表单变量document.result[0].value
传递onclick
到下一页吗?具体来说,这document.result[0].value=totalquestions-incorrect.length+ value
需要作为store_result.cfm
页面上的表单数据进行访问。
<form method="POST"><div
align="center"><center><p>
<script>
var wrong=0
for (e=0;e<=2;e++)
document.result[e].value=""
var results=document.cookie.split(";")
for (n=0;n<=results.length-1;n++){
if (results[n].charAt(1)=='q')
parse=n
}
var incorrect=results[parse].split("=")
incorrect=incorrect[1].split("/")
if (incorrect[incorrect.length-1]=='b')
incorrect=""
document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions
document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%"
for (temp=0;temp<incorrect.length;temp++)
document.result[1].value+=incorrect[temp]+", "
</script>
<input type="button" value="Continue" name="B1"
onClick="location.href='store_result.cfm';""></p>
</center></div>
</form>