Is There Any Way We Can Get Url Of PopUp Windows In Parent Window

前端 未结 2 959
慢半拍i
慢半拍i 2021-01-25 07:33

I want to Get a url of popUp window And Show It in Parent window.



        
2条回答
  •  失恋的感觉
    2021-01-25 07:55

    You can call a function onclick and have the url there as a variable:

    Click Here
    

    And then you can do anything you want with the url:

    function my_function()
    {
        var url = 'http://www.google.com';
        window.open(url ,'MyWindow',width=600,height=300);
        //show the url in an element
        return false;
    }
    

提交回复
热议问题