javascript!! <script>var me = (Math.random()).toString();document.write(me.substr(2,15));</script> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 比如我要实现这样一个功能:我要这个页面中随机产一个15位的数字,然后将这个数字带到下一页去要如何??如:<script>var me = (Math.random()).toString();document.write(me.substr(2,15));</script><form action="aaa.asp" method="POST"><input value="这里是随机产生的15数字" type="hidden" name="okok" ></form> 急急,谢!! 这个页面是html,所以要是javascript的。谢谢了,急,在线等 <form action="aaa.asp" method="POST" name=form1><input type=text name="okok" ><script>var me = (Math.random()).toString();document.form1.okok.value = me.substr(2,15);</script></form><script>只能放在input后,刷新时不会产生新值.如果想用在提交时产生,可以写成函数形式.<form action="aaa.asp" method="POST" name=form1 onsubmit='okok.value=document.form1.okok.value = ((Math.random()).toString()).substr(2,15);><input type=hidden name="okok" ></form> 上面的漏了引号;onsubmit="okok.value=document.form1.okok.value = ((Math.random()).toString()).substr(2,15);"> canvas问题 获得html元素的位置 请教各位:js怎样直接打印而不弹出打印对话框? 有关parseInt 一个相当郁闷的问题!!! "完成该操作所需的数据还不可用"?是什么错误啊? 调用文本 如何保证输入日期的格式?我要求的日期如99-8-1,并且要求不是99-08-01 easyui treegrid 的beginEdit问题 javascript里面的不等于 Extjs在Controller里面获取的变量值,怎么传到Controller外面? 无法察看页面的源代码了,这种现象是不是中毒了?? 小小问题
如:<script>
var me = (Math.random()).toString();
document.write(me.substr(2,15));
</script><form action="aaa.asp" method="POST">
<input value="这里是随机产生的15数字" type="hidden" name="okok" ></form> 急急,谢!!
<input type=text name="okok" >
<script>
var me = (Math.random()).toString();
document.form1.okok.value = me.substr(2,15);
</script>
</form><script>只能放在input后,刷新时不会产生新值.
如果想用在提交时产生,可以写成函数形式.
<form action="aaa.asp" method="POST" name=form1 onsubmit='okok.value=document.form1.okok.value = ((Math.random()).toString()).substr(2,15);>
<input type=hidden name="okok" >
</form>
onsubmit="okok.value=document.form1.okok.value = ((Math.random()).toString()).substr(2,15);">