dtbhp60824 2015-03-03 15:44 采纳率: 0%
浏览 44

jquery:将php include文件添加到jquery内容?

I am using the following jquery:

<script>
setTimeout(function() {
$(".home_column").flip({
    direction:'rl',
        color: 'rgba(138, 138, 138, 0.2)',
    content:'this is my new content'
});
}, 2500);
</script>

what I am trying to do is replace the content of the jquery where it says 'this is my new content' with a php file called login_form.php.

I have tried the following:

content:'<?php include 'login_form.php'; ?>'

however this does not work. if I use php within the content my jquery just stops working all together. my login_form.php file includes a form with 2 input boxes. can someone please show me how this can be done, thanks in advance

  • 写回答

1条回答 默认 最新

  • dousenjue3214 2015-03-03 16:10
    关注

    the file that has the script has to be a php file or it won't work, because it will not be parsed by php.

    Let me know if that's the case...

    评论

报告相同问题?