Home  >  Article  >  Backend Development  >  PHP uses post to dynamically select avatars and js events to dynamically change avatars

PHP uses post to dynamically select avatars and js events to dynamically change avatars

WBOY
WBOYOriginal
2016-07-29 09:16:18961browse
<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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn