<td>
是<input type="radio" name="userModel.phone_message_login" id="is_phone_message_login_Y" value="Y" οnclick="displayAndHiddenBtn('d')" checked/>
否<input type="radio" name="userModel.phone_message_login" id="is_phone_message_login_N" value="N" οnclick="displayAndHiddenBtn('h')" />
</td>
$(document).ready(function() {
var getValues = document.getElementsByName("userModel.phone_message_login");
var chooseStr = "";
//alert("start "+getValues.length);
for(var i=0;i<getValues.length;i++){
if(getValues.item(i).checked){
chooseStr = getValues.item(i).getAttribute("value");
break;
}else{
continue;
}
}
if(chooseStr == 'Y'){
var node = document.getElementById("mobilePhone").firstChild;
//alert("@@@" + node.innerHTML);
var add = document.createElement("font");
add.setAttribute('color','red');
add.innerHTML = "*";
document.getElementById("mobilePhone").insertBefore(add,node);
}
});