0

我可以仅在 Internet Explorer < 10 上禁用 CGridView 中的 ajax 更新吗?

4

2 回答 2

0

您可以手动获取 IE 版本并在小部件中添加使用:

$isIE10 = !preg_match('/(?i)msie [1-9]/',$_SERVER['HTTP_USER_AGENT']);

$this->widget('zii.widgets.grid.CGridView', array(
        .................
        'ajaxUpdate' => ($isIE10?'id':false),
        .................
));
于 2013-04-25T10:09:57.203 回答
0

您也可以使用 jQuery$.browser来检测它。

var ua = $.browser;
if ( ua.msie && parseInt(ua.version, 10) < 10 ) {
  alert( "Disable AJAX!" );
}

注意:未经测试的示例,从链接站点上的示例构建

于 2013-04-25T15:40:24.397 回答