本文介绍了如何调整IE9中的文本字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在Chrome浏览器中调整文本字段大小其它浏览器。但是,即使在为IE安装Chrome框架之后,我仍然无法在IE9中完成相同的工作。例如:b
style =resize:horizo​​ntal;有人可以告诉我如何让它在IE浏览器中工作吗?
Thanks。



* 编辑 * b
$ b好吧,经过很多调整之后,我终于使它适用于IE9! Yay:)

首先要做的是:您需要在IE9上安装Chrome Frame。



 < meta http-equiv =X-UA-Compatiblecontent = IE =边缘,铬= 1\" > 

以下是完整的代码:

 <!DOCTYPE> 

< html xmlns =http://www.w3.org/1999/xhtml>

< meta http-equiv =X-UA-Compatiblecontent =IE = Edge,chrome = 1>

< head>
< title>文字比例< / title>

< script src =Scripts / jquery-1.7.2.jstype =text / javascript>< / script>

< / head>
< body>
< input type =textid =txt1style =resize:horizo​​ntal; />
< input type =textid =txt2style =resize:both; />

< / body>
< / html>


解决方案

如果你看看,您将看到此功能不受支持如果你想在所有浏览器中支持这个功能,你将不得不在JavaScript中创建你自己的调整大小函数(如果有的话,我们使用任何框架) )。


I'm able to resize Text Field in Chrome & other browsers. However, I'm not able to make the same work in IE9, even after installing the Chrome frame for IE. I use for Ex:style="resize:horizontal;"

Ex:

Can someone suggest me how to make it work in IE browsers?Thanks.

*EDIT*

Ok, So after a lot of tweaking around, I finally made it to work for IE9 !! Yay :)

First things first : You need to install the Chrome Frame on IE9.

Then you add some tags for it to render on IE.

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

Here's the complete code :

<!DOCTYPE >

<html xmlns="http://www.w3.org/1999/xhtml">
<!-- <meta http-equiv="X-UA-Compatible" content="chrome=IE9">
<!-- X-UA-Compatible: chrome=1-->

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

<head>
    <title>Text Feilds</title>

   <script src="Scripts/jquery-1.7.2.js" type="text/javascript"></script>

 </head>
<body>
<input type="text" id="txt1" style= "resize: horizontal"; />
<input type="text" id="txt2" style= "resize: both"; />

</body>
</html>
解决方案

If you have a look at http://www.w3schools.com/cssref/css3_pr_resize.asp you will see that this feature is not supported in IE at all.

If you want to support this feature in all browsers you will have to create your own resize function in javascript (our use any framework if there is one).

这篇关于如何调整IE9中的文本字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:16
查看更多