使用onclick跳转到其它页面/跳到指定URL

1.如果是本页显示可以使用location,方法如下

   a.onclick="javascript:window.location.href='url'";

   b.onclick="location='url'";

   c.onclick="window.location.href='url?id=11'";

2.如果页面中有frame可以在location前面添加top.mainframe.frames['right-frame'].location

posted @ 2016-05-22 23:15  冬小麦1991  阅读(148)  评论(0)    收藏  举报