js调用php变量
1
function Check()// 验证表单数据有效性的函数 { var name= '<?php echo $user;?>'; if(name==""){ window.alert('请先登录!'); return false; } return true; }
Done!
- 上一篇 »如何在js里引用php变量?
- 下一篇 »在html页面中使用js变量
1
function Check()// 验证表单数据有效性的函数 { var name= '<?php echo $user;?>'; if(name==""){ window.alert('请先登录!'); return false; } return true; }
Done!