In order to implement Dynamic Web page interaction in HTML, it is necessary to call Javascript,javascript to provide an interface for interacting with PHP. The following columns are shown:
Create a new folder, including the jquery file library, 1.PHP, 1.HTML
HTML page code: (1.HTML)
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<script type= "Text/javascript" src= "Jquery-1.8.0.min.js" ></script>
<title> Front-end technology learning </title>
<body>
<script type= "Text/javascript" >
function Onc () {
$.get ("1.php", function (data) {
$ ("#learn"). HTML (data);
})
}
</script>
<div id= "Learn" onclick= "onc (); style=" Cursor:pointer; ">wll</div>
</body>
PHP page code: (1.PHP)
<?php
echo Wei Linlin;
?>
This makes it possible to interact with PHP.
Browser Browse as follows: Click WLL, change wll to Wei Lin Lynn
HTML page interaction (JavaScript, PHP)