html
<select name="selectop" id="selectop" size="25" style="width:350px;" onChange="getcwsfname(selectop)">
<%=opstr%>
</select>
</td>
//改变的js
function setopid(str)
{
var p=str.indexOf(',');
var strnew=str.substring(p+1);
var s=document.getElementById("selectop");
sltHtml="<select name=/"selectop/" id=/"selectop/" size=/"25/" style=/"width:350px;/" onChange=/"getcwsfname(selectop)/">";
sltHtml+=strnew;
sltHtml+="</select>";
s.outerHTML=sltHtml;//而不是innerhtml
//设置
}