使用jQuery从HTML页面重定向到PHP页面

时间:2012-01-20 08:46:28

标签: php javascript jquery

  

可能重复:
  How to redirect by using jquery?

在我的网站中,我想使用jQuery将用户从HTML页面重定向到PHP页面。

我该怎么做? 这可能吗?

3 个答案:

答案 0 :(得分:7)

为什么要使用jQuery?只是简单的JavaScript:

window.location='http://url.to.my/page.php'

答案 1 :(得分:2)

 $(location).attr('href',"MyPhpPage.php"); 

答案 2 :(得分:1)

你可以:)

$(location).attr('href',"MyPhpPage.php");