<textarea class="input_s1" name="cmInqriry.inquiryContent" cols="26" rows="4" id="cmInqriry.inquiryContent" title="<s:text name="common.alst.beizhu4.title.product.note"/>" οnclick="test(this)" οnblur="onBlure(this)" ><s:text name="common.alst.beizhu4.title.product.note"/></textarea><font color="red">*</font>
function test(obj)
{
if( obj.value=="在此写清其他说明或者货品数量,增票详情等" ||obj.value=="This include full instructions or quantity of goods and VAT details" ){
obj.innerHTML='';
document.getElementById("cmInqriry.inquiryContent").className="input_s2";
}else{
}
}
function onBlure(obj){
if(obj.value!=''){
if(obj.value!="在此写清其他说明或者货品数量,增票详情等" ||obj.value!="This include full instructions or quantity of goods and VAT details" ){
document.getElementById("cmInqriry.inquiryContent").className="input_s2";
}
}else{
var bLang = dojo.byId("bLang").value;
if(bLang==1){
document.getElementById("cmInqriry.inquiryContent").className="input_s1";
obj.innerHTML='在此写清其他说明或者货品数量,增票详情等';
}else{
document.getElementById("cmInqriry.inquiryContent").className="input_s1";
obj.innerHTML='This include full instructions or quantity of goods and VAT details';
}
}
}
js实现textarea提示框验证
最新推荐文章于 2022-12-27 12:43:35 发布