Placeholder does not works with IE's since its HTML 5 property...here is the crack
//javascript
function defaultval(ele,e)
{
if(e.type==="blur"
{
if(ele.value===""
ele.value=ele.title;
}
else if(e.type==="focus"
{
if(ele.value==ele.title)
ele.value="";
}
}
//HTML
input id="right_block_name" onfocus="defaultval(this,event)" onblur="defaultval(this,event)" class="right_block_form_name" type="text" name="full_name" title="Enter your name" value="Enter your name"
//javascript
function defaultval(ele,e)
{
if(e.type==="blur"
{
if(ele.value===""
ele.value=ele.title;
}
else if(e.type==="focus"
{
if(ele.value==ele.title)
ele.value="";
}
}
//HTML
input id="right_block_name" onfocus="defaultval(this,event)" onblur="defaultval(this,event)" class="right_block_form_name" type="text" name="full_name" title="Enter your name" value="Enter your name"
No comments:
Post a Comment