How to change image with onclick?

To change the image using OnClick function i have found 2 ways.

1. Using jQuery.
2. Normal JavaScript.

Lets look one by one.




second by using simple JavaScript. I suggest not you use direct JavaScript call function. Good PHP Technology companies are not using like this.




Share

3 thoughts on “How to change image with onclick?

  1. Thom

    Hi, thanks for keeping this page, even this code was in 2010, but has really solved y task for me today…

    more than 10 hours googling with no positive outcome.. THX .. Thanks- Tom

  2. SDFSDF

    http://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHghttp://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwhttp://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefihttp://www.phpmind.com/blog/2010/09/how-to-change-image-with-onclick/#xhttp://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=0waQCtzSrzzTmwuR=mtvqbLVNOTHggwXthttp://www.phpmind.com/blog/wp-contehthttp://http://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securhttp://www.phpmind.com/blog/2010/09/how-to-change-image-with-onclick/#image_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwXtwww.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwXttp://www.phpmind.com/blog/wp-content/pluhttp://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwXtgins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwXtnt/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=http://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwXtmtvqbLVNhttp://www.phpmind.com/blog/wp-content/plugins/si-http://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwXtcaptcha-for-wordpress/captcha/securimage_show.php?http://www.phpmind.com/blog/wp-content/plugins/si-captcha-for-wordpress/captcha/securimage_show.php?si_form_id=com&prefix=mtvqbLVNOTHggwXtsi_form_id=com&prefix=mtvqbLVNOTHggwXtOTHggwXtXtgwXt

Leave a Reply

Your email address will not be published. Required fields are marked *