首页 新闻 赞助 找找看

怎么改写才对

0
悬赏园豆:5 [待解决问题]

     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}';

这样写不对

杀  手的主页 杀 手 | 菜鸟二级 | 园豆:213
提问于:2011-06-23 09:27
< >
分享
所有回答(1)
0

window.opener.document.getElementById('<%=ddlConstrucompany.ClientID%>').options[document.getElementById('<%=ddlConstrucompany.ClientID%>').selectedIndex].value='{0}'

慧☆星 | 园豆:5640 (大侠五级) | 2011-06-23 11:32
没效果,不知道为什么
支持(0) 反对(0) 杀 手 | 园豆:213 (菜鸟二级) | 2011-06-23 12:08
看看最终生成的代码是什么样的
支持(0) 反对(0) 慧☆星 | 园豆:5640 (大侠五级) | 2011-06-23 14:17
不正确
支持(0) 反对(0) 杀 手 | 园豆:213 (菜鸟二级) | 2011-06-24 15:01
根据最终生成代码,改写后端代码的输出方法
支持(0) 反对(0) 慧☆星 | 园豆:5640 (大侠五级) | 2011-06-24 15:28
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册