1.PHP
a.PHP -> HTML & JavaScript 额 超简单,我也要写= =~ HTML代码中 />JavaScript代码中
代码如下:
b.PHP <-> MysqL PHP代码中
代码如下:
PHP
$dbcnx = @MysqL_connect ( "localhost","root","1234" );
if (! $dbcnx) {
echo ("Unable to connect to the " . "database server at this time.");
exit ();
} if (! @MysqL_select_db ( "pms" )) {
echo ("Unable to locate the joke " . "database at this time.");
exit ();
}
MysqL_query ( "SET NAMES 'GB2312'" );
$q=MysqL_query("select * from ability where ALV = 1");
while($row=MysqL_fetch_array($q)){
$array1[] = $row[AName];
}
?>
$dbcnx = @MysqL_connect ( "localhost","root","1234" );
if (! $dbcnx) {
echo ("Unable to connect to the " . "database server at this time.");
exit ();
} if (! @MysqL_select_db ( "pms" )) {
echo ("Unable to locate the joke " . "database at this time.");
exit ();
}
MysqL_query ( "SET NAMES 'GB2312'" );
$q=MysqL_query("select * from ability where ALV = 1");
while($row=MysqL_fetch_array($q)){
$array1[] = $row[AName];
}
?>
2.HTML
a. HTML -> PHP (POST方式) HTML代码中 代码如下:
do.PHP 文件代码中
代码如下:
b. HTML -> JavaScript
JavaScript代码中 (可获得,可更改)
代码如下:
3.JavaScript
a. JavaScript -> HTML (通用法,未验证) JavaScript代码中 代码如下:
代码如下:
b. JavaScript -> PHP 通过html的转接 1.JavaScript代码先给html
代码如下:
2.HTML代码给PHP
代码如下:
3.do.PHP接收到
代码如下: