而不是innerHTML用于在IE11上更改Table值

时间:2015-05-14 02:48:58

标签: javascript internet-explorer

我的javascript代码使用innerHTML动态更改表列表中的值。

但是,我已经检查过IE11不会让intterHTML更改表值。

有没有人知道更改表格中的列表值而不是innerHTML的替代方法?

你还可以给我看一个示例代码吗?

这是我的代码的一部分。

<script type="text/javascript">
 /*repeating following process for list_A and list_B*/
   var request = new XMLHttpRequest();
   request.open("GET", "listValues.php", false ); 
   request.send(null);
   document.getElementById("list_"+ tableType).innerHTML=request.responseText ;  
 //tableType above must be list name A or B//

</script>   
<body>   
<table color='glay' highth='256'>  
    <tr/>
        <td/ width=64><p id =" list_A" ></p>  
        <td/ width=64><p id =" list_B" ></p>  
</table>
</body>

1 个答案:

答案 0 :(得分:0)

您可以尝试以下

$(&#34; list _&#34; + tableType).html(request.responseText);

相关问题