跨frame加option,以下代码在ie5中会出错,但在ie4、ie6、opera6、nnx中都没有问题:<script>function addoption(aselect, optionid, optionname) { newoption = new option(optionname, optionid); aselect.options[aselect.options.length] = newoption;}</script>
这样才是对的:<script>function addoption(aselect, optionid, optionname) { ownerwindow = aselect.document.parentwindow; ownerwindow.newoption = new option(optionname, optionid); aselect.options[aselect.options.length] = ownerwindow.newoption;}function crossframeaddoption() { var aselect = parent.otherframename.document.forms[0].theselectname; addoption(aselect , "id"+ aselect.options.length, "name"+ aselect.options.length);}</script><input type="button" onclick="crossframeaddoption();" value="test">
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器