Get result from php file without usig jquery

前端 未结 2 1434
借酒劲吻你
借酒劲吻你 2020-12-22 07:05

Is this possible to get result from a php file without using jQuery ? i haven\'t permission to use Jquery and any other javaScript platform.

2条回答
  •  天涯浪人
    2020-12-22 07:53

    i use this one to send request with javascript and its works perfectly :

    function httpGet(theUrl)
    {
            var xmlHttp = null;
    
            xmlHttp = new XMLHttpRequest();
            xmlHttp.open( "GET", theUrl, false );
            xmlHttp.send( null );
            alert(xmlHttp.responseText);
    }
    

    and the html code :

    
    
    
    
    
            Send log
    
    
    

提交回复
热议问题