在网上想要找到靠谱的资料真是犹如大海捞针一般困难。
好吧废话不多说,下面贴出可以正确运行的代码。
前提条件:apache已经启动,可以在浏览器地址栏中使用localhost/xxxxx.php访问php文件
<?php
header("Content-Type:text/html;charset=utf-8");
?>
<html>
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<body>
<form id="myform" method="POST">
<table >
<tr>
<td id="username"> 用户名:</td><td><input type="text" name="username"/></td>
</tr>
<tr>
<td id="realname">真实姓名:</td><td><input type="text" name="realname"/></td>
</tr>
<tr>
<td id="id&#