2

ajax を使用してロードしたいページの一部があります。コンテンツは、このウィザードの HTML です: http://techlaboratory.net/labs/SmartWizard2/index.htm

現在行っていること:

$(function(){

    $.ajax({
        url: 'content.htm',
        dataType: 'html',
        success: function(data) {

            $('#content').html(data);

            $('#wizard').smartWizard({

            //#wizard is inside the #content

                transitionEffect:'fade', 
                onFinish: function() { 
                    alert('finishClicked');
                } 

            });


        }
    });

});    

$('#wizard').smartWizard() を使用し、すべてを同じページに保持すると、スクリプトは正常に動作します。しかし、ajaxでロードすると機能しません。誰でも違いを教えてもらえますか?解決方法はありますか?ありがとう

4

1 に答える 1

0

同一オリジン ポリシーにより、異なるドメインで ajax リクエストを行うことはできません

これを克服するための解決策がいくつかあります。こちらをご覧ください: https://stackoverflow.com/search?q=Same+Origin+Policy

于 2011-10-11T21:12:52.233 に答える