ie浏览器对DWR支持的bug~~

 我的java代码:
//ie浏览器不支持的javascript
    public Document newButton(){
        XmlUtil xmlUtil = new XmlUtil();
        Element button = xmlUtil.creatElemet("input");
        Document document =  xmlUtil.creatDocument(button);   
        button.setAttribute("id","uu");
        button.setAttribute("type","button");
        button.setAttribute("value","click me");
        button.setAttribute("onclick","javascript:window.alert('xml')");
        System.out.println(button.getAttributes());
        return document;
    } // end_class


我的页面代码:
<%@ page language="java" contentType="text/html; charset=GBK"
    pageEncoding="GBK"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="STYLESHEET" type="text/css"
    href="jspAgent/_css/headagent.css">
<script type='text/javascript' src='/tgtc/dwr/interface/tomajax.js'></script>
<script type='text/javascript' src='/tgtc/dwr/engine.js'></script>
<script type='text/javascript' src='/tgtc/dwr/util.js'></script>
<script type='text/javascript'>
function call(data){
    window.alert(data);
    window.document.write(data);
}

function calls(data){
    DWRUtil.setValue('xml',data);
}
</script>
</head>

<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<form method="get" action="bb.jsp">
    <input type="text" name="hxj"value="nihao"><br>
    <input type="button" value="nihao" οnclick="javascript:tomajax.myage('hxj',call)"><br>
    <input type="text" id="nn"><br>
    <input type="button" value="xmlbutton" οnclick="javascript:tomajax.newButton(calls);"><br>
    <div id="xml"></div>
</form>
</body>
</html>


执行的结果:





关键是 我在 鼠标 单击 click me 的按钮,不执行制定的脚本语言,但是在firefox下测试可以动态执行脚本语言!这让我感到很是郁闷!!求解 ~~~~~~为何IE浏览器不支持动态新增的脚本语言呢?~~

看来微软的东东有点龌龊~~~
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值