this关键字冲突问题 js 和 php是两回事,怎么能混用呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是这样的:我要在页面上输出onChange=document.location.href=("test.php?p="+this.value)实现跳转我在一个类的函数里面这样写echo 'document.location.href=("'.$this->file.'?'.$this->pvar.'='.'+this.value")';其中$this->file是提交的页面,$this->pvar是传送的变量,变量的值为我选择框选择的值,即this.value,但是得不到this.value的值。 根本就是两回事情,编写代码要严谨一点试试看这个:echo "document.location.href=(\"".$this->file."?".$this->pvar."=+this.value\")"; 确实,谢谢nethermit(网络隐士) ,祝明天考试顺利我是这样的:echo 'document.location.href=("'.$this->file.'?'.$this->pvar.'="'.'+this.value)'; PHP如何实现超大文件上传 恳请各位前辈推荐一下PHP空间? 创业型公司招聘PHP高级程序员 上传附件的问题 关于PHP中的输入验证问题 提示:Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 隐藏电影的的真实地址 用php的类发送邮件有主题却没有类容? 为什么数据库只能读不能写 以 .iso 结尾的文件扩展名用什么打开! 如何用PHP建立一个指定文件名的新文件. 为什么不可以???
我要在页面上输出
onChange=document.location.href=("test.php?p="+this.value)实现跳转我在一个类的函数里面这样写
echo 'document.location.href=("'.$this->file.'?'.$this->pvar.'='.'+this.value")';
其中$this->file是提交的页面,$this->pvar是传送的变量,变量的值为我选择框选择的值,即this.value,但是得不到this.value的值。
试试看这个:
echo "document.location.href=(\"".$this->file."?".$this->pvar."=+this.value\")";
echo 'document.location.href=("'.$this->file.'?'.$this->pvar.'="'.'+this.value)';