<html> <head> <meta http-equit="Content-type" c charset="utf-8"> <title>动态选择头像logo</title> <script type="text/javascript"> <span>function</span><span> check(obj){ $(</span>"showImage").src = obj.<span>value; } </span><span>function</span><span> $(obj){ </span><span>return</span> document.<span>getElementById(obj); } </span></script> </head> <body> <?<span>php </span><span>echo</span> '<img src="'.<span>$_POST</span>['mylogo'].'">'<span>; </span>?> <img src="1.png"> <br> <form action="" method="post"> <select name="mylogo" name="submit" title=""/> </form> </body> </html>
The above introduces the use of PHP posts to dynamically select avatars and js events to dynamically change avatars, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.