把你的脚本直接写在 html 文件里运行就可以看到那里错误了;string s="<script language=javascript>window.opener.document.getElementById('txtKemu').value=\"" + xml +"\";alert(window.opener.document.getElementById('txtKemu').value);window.opener.document.getElementById(\"btnAdd\").click(); </script>"); "把这个 string copuy 出来直接写在 aspx 文件里或html 文件里看看;