日期:2014-05-16 浏览次数:20383 次
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false}
else {return true}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(state,"请选择审核状态!")==false)
{state.focus();return false}
}
}
</script>
<select id="sel1"><option>默认值</option></select>
<script type="text/javascript">
window.onload = function () {
alert(document.getElementById('sel1').value)
}
</script>