from: http://topic.youkuaiyun.com/u/20090407/18/6b4b7ecd-02c6-4fd8-b7f4-df0be4af8ac7.html
//get selected value and put into an html element
function getSelectedValue(selector, tips){
var target = document.getElementById(tips);
target.value = selector.value;
//alert('value: '+target.value);
}
//submit a form, by building url with value of html element
function viewDetailById(formid,action_url,tips){
var param = document.getElementById(tips).value;
if(param.length<1){
alert('please select an option!');
return false;
}
var f = document.getElementById(formid);
f.action=action_url+param;
//alert('action: '+f.action);
f.submit();
}