0

document.open以下は、メソッドを介して開かれたリンクにスクリプトファイルを追加するために使用しているjqueryコードですが、url

$(document).ready(function(){
    $('button').on('click',function(){
        var myid = $(this).attr('id');
        var url = "http://mysite.com/"+ myid +"/index.html";
        window.open(url,"_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400");

        var s = document.createElement("script");
        s.type = "text/javascript";
        s.src = "http://mysite.com/apiwrapper.js";
        $("head").append(s);
    })
})

メソッドで開いたieに追加http://mysite.com/apiwrapper.jsする必要がありますurlwindow.open

4

0 に答える 0