Re: [问题] html5 placeholder in IE11

楼主: tobedesigner (乱)   2015-01-13 18:35:56
※ 引述《GoalBased (Artificail Intelligence)》之铭言:
: (A) <textarea rows="5" placeholder="你好"></textarea>
: (B) <input type="text" placeholder="我好">
我直接抓取你的去 JS Bin 产生一个html档案
档案内容:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<textarea rows="5" placeholder="你好"></textarea>
<input type="text" placeholder="我好">
</body>
</html>
用以下四个浏览器简单分析:
IE 11:
http://i.imgur.com/SCy7kpA.gif
Chrome:
http://i.imgur.com/ty3VDlF.gif
Firfox:
http://i.imgur.com/Hh50deZ.gif
Opera:
http://i.imgur.com/nkrSbZX.gif
四个浏览器感觉都正常。
比较有差异的点在于,IE当你的鼠标在字段内时它会把placeholder的文字清除;
其它的浏览器,感觉是当有输入时才会有所动作

: 浏览器:IE11
: (A)placeholder无效,直接变成text
: (B)placeholder有效
: 浏览器:Chrome
: (A)placeholder有效
: (B)placeholder有效
: 是IE又....跟人家不一样了,还是我的问题呢?
: 有人遇过相同问题吗? THX

Links booklink

Contact Us: admin [ a t ] ucptt.com