s2=document.getElementById('admin').checked ? "1" :"0"
javascript-checkbox
javascript-combo
javascript-radio
javascript-check
function _lookup(v_id,v_value,v_enable)
{
var result="";
if(document.getElementById(v_id))
{
var _o=document.getElementsByName(v_id);
var result="";
if(document.getElementById(v_id).type=="radio" || document.getElementById(v_id).type=="checkbox") //checkbox,SELECT,INPUT,text
{
for (var i = 0; i < document.getElementsByName(v_id).length; i++) {
if (_o[i].checked) {result= _o[i].value;}
}
}
else {result=document.getElementById(v_id).value;}
}
return result ;
}
沒有留言:
張貼留言