亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - Google Chrome relative path is based on current page
曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新 2017-05-19 10:09:53
0
1
879

It is a simple ajax cross-domain value transfer, using the relative path code as follows:

    //這里我沒有做瀏覽器判斷
    var url ="../Qiniu/changeMysql.php";
        console.log(URL);
        $.ajax({
            url:url,
            type:'POST',
            data:{'randomName':randomName,'id':id},
            dataType:'JSON',
            success:function(res){}
            )};

But my file directory is like this

 vtour_background----Qiniu------------changeMysql.php
                  | 
                  ---BackgroudHTML---indextest.html(為瀏覽器運(yùn)行頁(yè)面,引用changepictures.js)
                                  |    
                                  ---scripts ----------------changepictures.js
                                  

The above code is that the relative path of the chrome browser in changepictures.js is not based on the current js? The url should be "../../Qiniu/changeMysql.php", but now I can use the above url to pass the value correctly. do not know why. Could you guys help me out or tell me how to check this error? Thank you very much~

曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新

reply all(1)
漂亮男人

It should be the html file imported relative to the js file, and has nothing to do with the path of the js file.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template