Input placeholders for Internet Explorer

In looking at the "Web Forms : input placeholder" section of HTML5 Cross Browser Polyfills, one I saw was jQuery-html5-placeholder.

I tried the demo out with IE9, and it looks like it wraps your <input> with a span and overlays a label with the placeholder text.

<label>Text:
  <spanstyle="position: relative;">
    <inputid="placeholder1314588474481"name="text"maxLength="6"type="text"placeholder="Hi Mom">
    <labelstyle="font:0.75em/normal sans-serif;left:5px;top:3px;width:147px;height:15px;color:rgb(186,186,186);position: absolute;overflow-x: hidden;font-size-adjust: none;font-stretch: normal;"for="placeholder1314588474481">Hi Mom</label>
  </span>
</label>

 

 

There are also other shims there, but I didn't look at them all.

 

From: http://stackoverflow.com/questions/5522164/input-placeholders-for-internet-explorer

posted @ 2012-08-16 00:46  Lux.Y  阅读(217)  评论(0编辑  收藏  举报