简体   繁体   中英

Return results into div of different page

I Just want to return results from a php file into a div located on a different page. this is what i have done, #box is the div class located on a different page. Any help will be appreciated

<script type="text/javascript">
$(document).ready(function(){

 $("button").click(function(){
    var str= "hellos";


    $.post('INCLUDES/show.php',{t: str},
    function(output)
    {

        $(#box').html(output).show();
    });
 });
});
</script>

我曾经做过的唯一方法是使用window.opener ,但我不是使用它的专家,因此建议您仔细阅读文档。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM