大佬教程收集整理的这篇文章主要介绍了占位符在页面加载时打开jQuery UI自动完成组合框(IE10),大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这仅在IE10及更高版本上发生.
这是我的代码:
_create: function () { this.wrapper = $("<span>") .addClass("custom-comboBox") .insertAfter(this.element); this.element.hide(); this._createAutocomplete(); this._createShowAllButton(); this.input.attr("placeholder",this.element.attr('placeholder')); },
一旦组合框被聚焦,自动完成框就消失了,当组合框失去焦点时它仍然保持这种状态.
所以,我们的解决方案有点破解,我们添加了一个.focus()后跟一个.blur():
_create: function () { this.wrapper = $("<span>") .addClass("custom-comboBox") .insertAfter(this.element); this.element.hide(); this._createAutocomplete(); this._createShowAllButton(); this.input.attr("placeholder",this.element.attr('placeholder')); this.input.focus().blur(); //^^^^^^^^^^^^^^^^^^^^^^^^^^ Voila! },
以上是大佬教程为你收集整理的占位符在页面加载时打开jQuery UI自动完成组合框(IE10)全部内容,希望文章能够帮你解决占位符在页面加载时打开jQuery UI自动完成组合框(IE10)所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。