JQueryMobile 超链接提示“error loading page” 错误

  由于 JQueryMobile  对于超链接和提交事件做了优化处理,默认的都会以ajax提交,当重定向到其他地址的时候容易出现 Error loading page 的提示,这个jqueryMobile自带的,所以一般处理情况采用一下办法。

1、普通的超链接的话加入 rel便可以

 htmlAttributes: new {  rel = "external" }

 

2、对于from提交的,可能需要多加一段,以用于阻止使用ajax提交。

 htmlAttributes: new {  data_ajax="false",rel = "external" }

 

3、如果是回退的话,直接data_rel="back"便可。

data_rel="back"

例如:@Html.ActionLink("后退", "toback", "Default", routeValues: null, htmlAttributes: new { data_rel="back"})

 

posted @ 2014-10-23 13:11  月夜清风  阅读(1122)  评论(0)    收藏  举报