ie下面显示不了是ajax代码的问题吗?var xmlhttp;
function createXHR()
{
try
{
xmlhttp=new ActiveXObject("Msxm12.XMLHTTP"); //支持不同浏览器版本,下同
}
catch(e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new XMLHttpRequest();
if(xmlhttp.overrideMimeType)
{
xmlhttp.overrideMimeType("text/xml");
}
}
catch(e){}
}
}
if(!xmlhttp)
{
return false;
}
}function doAjax( url )
{
createXHR();
xmlhttp.onreadystatechange=requestAjax;
xmlhttp.open( "GET", url, true );
xmlhttp.send( null );
}function requestAjax()
{
if(xmlhttp.readyState==4)
{
if(xmlhttp.status==200)
{
document.getElementById('showcards').innerHTML = xmlhttp.responseText;
}
}
}下面是php文件中的代码<table>
<?php
$array=explode("@",$_SESSION["goodsid"]);
$arrayinfo=array();
for($i=0;$i<count($array);$i++){
if($array[$i]!=""){
$sqlcart=mysql_query("select * from cards where card_no='".$array[$i]."'",$conn);
$infocart=mysql_fetch_array($sqlcart);
array_push($arrayinfo,$infocart);
}
} if(count($arrayinfo)==0){
?>
<tr>
<td height="22" colspan="5" bgcolor="#FFFFFF">点击武将名,登录您的武将卡,<br />再次点击武将名,拿下武将卡(点击图片也行)。</td>
</tr>
<?php
}else{
?>
<tr>
<?php
for($m=0;$m<=7;$m++){ ?>
<td width=100px><a href="#" target="_self" onclick="doAjax( 'clearone.php?id=<?php echo $arrayinfo[$m][0];?>' )">
<?php
echo '<img src="234/'.$arrayinfo[$m][0].'.jpg" width=100px />';
?>
</a></td>
<?php
}
?>
<td><a href="#" target="_self" onclick="doAjax( 'clearall.php' )"><img src="log.png" width=30px /></a></td>
</tr>
<tr>
<?php
for($m=0;$m<=7;$m++){ ?>
<td> <?php
echo $arrayinfo[$m][3];
switch($arrayinfo[$m][2]){
case "1" :echo '<img src=1.png width=20px />';break;
case "1.5" :echo '<img src=1.png width=20px /><img src=0.5.png width=20px />';break;
case "2" :echo '<img src=1.png width=20px /><img src=1.png width=20px />';break;
case "2.5" :echo '<img src=1.png width=20px /><img src=1.png width=20px /><img src=0.5.png width=20px />';break;
case "3" :echo '<img src=1.png width=20px /><img src=1.png width=20px /><img src=1.png width=20px />';break;
default :break;
} ?>
</td>
<?php
}
?>
</tr>
<!-- <tr>
<td ><a href="#" target="_self" onclick="doAjax( 'clearall.php?id=<?php echo $arrayinfo[$m][0];?>' )">xx</a></td>
</tr> -->
<?php
} ?>
</table>
ie下没有文件的名字,