我正在尝试在hint()框中显示“比正常大”的文本。在Internet Explorer 11中调用javascript hint()函数时,我的大部分文本都被隐藏了。它似乎仅支持2行文本。Chrome,Firefox和Opera似乎运行良好。这似乎只是IE问题。
这是演示问题的小提琴:JSFiddle示例
prompt("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.");
我只能看到此文本“ Lorem Ipsum只是印刷和排版行业的虚拟文本。LoremIpsum从1500年代开始就是该行业的标准虚拟文本。” 其余的不显示。
恐怕我已经知道答案了,但是为什么会这样呢?我宁愿使用hint()而不使用自定义模式。
您可能不应该一window.prompt
开始就使用。由于它阻塞线程,因此人们对此大为不满,因此可能会中断您的应用程序。当今的网络已经朝着利用JavaScript的异步特性发展。这应该从之类的东西距离我们alert
,prompt
等等。
当前prompt
,沉浸式Internet Explorer(“ Metro”),xbox上的Internet Explorer或Windows Web应用程序(以前称为Windows Store Applications)不支持。相反,鼓励您利用第三方工具和库(例如Bootstrap,jQuery UI等)来满足这些类型的需求。
综上所述,这是Internet Explorer与其他现代浏览器之间的真正区别,因此,我在内部为IE团队讨论了一个问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句