未捕获的SyntaxError:意外的令牌<从一个域呼叫到另一个域时出错

时间:2015-12-12 06:23:48

标签: javascript jquery

当我从一个测试页面功能域调用到使用java脚本的另一个html页面域时,我收到错误 `在order.html页面我写了像这样的脚本函数

$(document).ready(function () {
    Test();
    }
    );
    function Test() {
        $.ajax({
            type: 'GET',
            dataType: 'jsonp',
            crossDomain: true,
            contentType: 'text/javascript; charset=utf-8',
            async: false,
            cache: true,
            jsonp: false,              
            url: 'http://localhost:27746/Test.aspx/SessionLogin',                
            success: function (data, textStatus, jqXHR) {                 
            }
        });
    }`

It's not going to sessionlogin() function break point. after page load is completed I am getting the error. Even test.aspx page doesnot have any controls it has only sessionlogin() in .cs

0 个答案:

没有答案