如题,浏览器ie8模式下登录thinkcmf后台,登录成功或失败的提示信息都不显示,如图:

控制台提示信息: 对象不支持“bind”属性或方法

解决办法: 找到后台登录的模板文件 public/themes/admin_simpleboot3/admin/login.html
在head标签加:
<script type="text/javascript">
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () {},
fBound = function () {
return fToBind.apply(this instanceof fNOP && oThis
? this
: oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
fNOP.prototype = this.prototype;
fBound.prototype = new fNOP();
return fBound;
};
}
</script>
问题解决.
针对ThinkCMF系统,在IE8浏览器下登录后台时出现提示信息不显示的问题,原因是浏览器不支持'bind'方法。解决方法是在后台登录模板文件`public/themes/admin_simpleboot3/admin/login.html`的head部分添加相关代码,从而实现兼容。
784

被折叠的 条评论
为什么被折叠?



