-3

I'm using the following code

<input required type="text" name="name" placeholder="Enter your name.." />

but the placeholder value is not appearing in IE browser, please give me a solution or give me an alternative method.

zzlalani
  • 22,960
  • 16
  • 44
  • 73
Gilchrist Adam
  • 179
  • 1
  • 1
  • 3

2 Answers2

1

IE9 and earlier don't support the placeholder attribute. It's in IE10+.

There are a number of JavaScript solutions out there, if you look for "placeholder shim" or similar. For instance, I did the place5 jQuery plug-in, but that won't help you if you don't use jQuery. But again, there are several others out there. This question and its answers list several.

Community
  • 1
  • 1
T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
0

You can have the placeholder displayed in IE browsers too. Use this plugin, it's probably the simplest method.

Works in all A-grade browsers, including IE6.

Good luck!

watt
  • 799
  • 3
  • 8
  • 22