function selRandom(){
var objSelectd;
var countOption;
var indexSel;
objSelectd = document.getElementById("id");
countOption = objSelectd.length;
indexSel = Math.floor(Math.random()*countOption+1);
objSelectd.value = objSelectd.options[indexSel].value;
}
---------------------------------------------------------------
AUTHOR:testerZH
用途:菜鸟的个人学习记录,有不对的地方请指正!谢谢!
出处:http://www.cnblogs.com/testerZH/