【发布时间】:2014-11-12 08:22:53
【问题描述】:
我目前遇到了 PHP 和 jQuery 的问题。我已经建立了一个这样的网站:
index.php
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test Page</title>
</head>
<body>
include('content.php');
<script src="js/jquery.min.js"></script>
</body>
内容.php
test
<script type="text/javascript">
$(document).ready(function() {
alert("Hello World");
});
</script>
但是当页面加载时..警报不起作用..我错过了什么吗?
【问题讨论】:
-
试试
<?php include('content.php'); ?>而不是include('content.php'); -
赞成。对于初学者来说,这实际上是一个很好的问题。 (但是引导程序在哪里?)
标签: javascript php jquery include