http://members.aol.com/grassblad/html/valText1.html





/* -------------------------------
author: Vincent Puglia, GrassBlade Software
site: http://members.aol.com/grassblad
----------------------------- */

// the HTML code for the javascript version





// the javascript function
function validIt(fldObj)
{
var fldVal = fldObj.value;

if ( ( fldVal == '') || (fldVal == 'Email address') )
{
alert('You must fill in the field')
fldObj.focus()
fldObj.select();
}
else
fldObj.value = 'http://' + fldVal;
}


// the code for the HTML version

onBlur="javascript:value =
((value == '') || (value=='Enter data')) ?
'Enter data' : 'http://' + value;
if(value=='Enter data'){ this.focus(); this.select()}">



arrow
arrow
    全站熱搜

    付爸爸 發表在 痞客邦 留言(0) 人氣()