Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet explorer Internet Explorer中更改元素属性的Jquery问题_Internet Explorer_Jquery Selectors - Fatal编程技术网

Internet explorer Internet Explorer中更改元素属性的Jquery问题

Internet explorer Internet Explorer中更改元素属性的Jquery问题,internet-explorer,jquery-selectors,Internet Explorer,Jquery Selectors,我正在使用Jquery根据用户输入创建动态链接。我有一组元素在我的 ajax加载的div如下所示 <div class="mxcell"> <input type="text" size="40" class="input_name" value=""> <a href="#" target="_blank" class="dyn_link"> <img src="http://127.0.0.1/images/arrow_right.gif">

我正在使用Jquery根据用户输入创建动态链接。我有一组元素在我的 ajax加载的div如下所示

<div class="mxcell">
<input type="text" size="40" class="input_name" value="">
<a href="#" target="_blank" class="dyn_link">
<img src="http://127.0.0.1/images/arrow_right.gif">
</a>
</div>
这在Chrome/Firefox中运行良好,但在Internet Explorer中不起作用

有什么想法吗

IE调试器指向Jquery第69行字符15。我不知道要进一步调查

更新:

我通过使用focusOut()而不是change()解决了上述问题

但我仍然不确定是否有更好的解决方案

我想
keyup
而不是
focusOut
,我稍微清理了一下你的href转换器:

$("#right").delegate(".input_name", "keyup", function() {
    var $this = $(this);
    var dyn_link = $this.val();
    $this.next("a").attr("href","http://www.example.com/" + dyn_link + ".html");
});

在更改inputfeld中的值时,会创建一个动态链接,如href=''。在IE中,这仍然是href=“#”
$("#right").delegate(".input_name", "keyup", function() {
    var $this = $(this);
    var dyn_link = $this.val();
    $this.next("a").attr("href","http://www.example.com/" + dyn_link + ".html");
});