为了账号安全,请及时绑定邮箱和手机立即绑定

向getVerify.php传参的问题

onclick="document.getElementById('verifyImage').src='getVerify.php?r='+Math.random() 这串代码,传参里面的  r= + Math.random();  这个r怎么来的?并且 getVerify.php页面并没有接受这个参数啊,还有Math.random()返回的是0~1之间的数字,但是类型中就只有1,2,3,4四种类型的验证码啊....这点好晕啊

正在回答

1 回答

不就是单纯得访问了'getVerify.php?r='+Math.random() 只是为了刷新吧讲道理不加应该没事吧没有试过 

4种类型的验证码 你假如想要用get的话

getVerify.php?r='+Math.floor(Math.random()*(max-min+1)+min);

getVerify('字体路径',$type=$_Get['r']);

这节练习没做代码可能有错误 你就看看吧 

0 回复 有任何疑惑可以回复我~
#1

9527_24

isset($_GET['r'])?$type=$_GET['r']:$type=1; 再改一下getVerify('字体路径',$type);
2017-01-08 回复 有任何疑惑可以回复我~
#2

孤峰望明月 提问者

非常感谢!
2017-01-11 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

向getVerify.php传参的问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信