Response.Write(string.Format("<script type='text/javascript'>window.opener.document.getElementById('txtRoomName').value='{0}';window.opener.document.getElementById('comroomid').value='{1}';</script>", strComRoomName, strComRoomID));
如果把'txtRoomName'换成dropdowlist的id怎么写,我没有写出来,dropdowlist的id为ddl吧,就是dropdownlist选定想的值为='{0}',该怎么做
//window.opener.document.getElementById(<%=ddlConstrucompany.ClientID%>).options[document.getElementById(<%=ddlConstrucompany.ClientID%>).selectedIndex].value='{0}';
这样写不对
window.opener.document.getElementById('<%=ddlConstrucompany.ClientID%>').options[document.getElementById('<%=ddlConstrucompany.ClientID%>').selectedIndex].value='{0}'