Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<TITLE> Demo </TITLE>
</HEAD>
<BODY>
<script src= "Jquery.js" type= "Text/javascript" ></script>
<script type= "Text/javascript" >
function clickimg () {
$.ajax ({
Type: "POST",//Submit type
URL: "demo.php",//Submit page
Data: "Row=" +row,
Success:function (msg) {
$ ("#number"). Text (msg);
}//Success output
});
}
</script>
<span id= "Demo" ></span>
<span id= "Number" ></span>
</BODY>
</HTML>
Above is the HTML page code
Copy Code code as follows:
<?php
$link = mysql_connect (' 192.168.1.11 ', ' root ', ' 12345 ');
mysql_select_db ("Mltest", $link);
$strlan = mysql_query ("UPDATE newtable SET click = Click +1 WHERE id= ' 1 '");
$str = mysql_query ("Select click from newtable WHERE id = ' 1 '");
while ($row = Mysql_fetch_array ($STR))
{
echo $row [' click '];
}
?>//manipulate the database and return a value
Above the PHP page code.
Using the jquery1.4.1 version of the class library