Ajax代码不起作用

this is my js code

function load(div_tag,thefile)
{

    if(window.XMLHttpRequest)
    {
        xmlhttp = new XMLHttpRequest();
    }
    else
    {
        xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
    }
    xmlhttp.onreadystatechange = function()
    {
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
        {
            document.getElementById(div_tag).innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.open('GET', thefile, true);
    xmlhttp.send();
}

and this my php code

echo '<div style="float:left; margin-left:2px; margin-top:17px; background:#666; text-align:center; width:auto;"><a href="#div" onclick="load(\'div\',\'include/comment_form.php\')" style="text-decoration:none;"><b style="color:white;">Add comment</b></a></div>';

echo '<div id="div" align="left" style="clear:both;"></div>';

the problem is it's working in xampp but it is not working in my website. I am a starter please help me.

Answer to fit the successful comment:

The function load() should return a value true or false, since it is in the onclick handler of a <a tag. Since load() does not return anything, the result is browser dependent.

Just return true in load() to activate the anchor redirect

function load(div_tag,thefile)
{
    ...
    xmlhttp.open('GET', thefile, true);
    xmlhttp.send();

    return true;
}