This article mainly introduces JavaScript to implement random switching of WeChat ID. Friends who need it can refer to
js to implement random switching of WeChat ID. The code is divided into js and html parts. Please refer to
js code:
arr_wx =new Array("aaaa","bbbb","cccc"); var wx_index = Math.floor((Math.random() * arr_wx.length)); var stxlwx = arr_wx[wx_index]; var img = "<?php echo $pctem['pathurl'] ?>"+arr_wx[wx_index]+".jpg"
html code:
<script>document.write(stxlwx)</script>
The above is what I compiled for everyone. I hope it will be helpful to everyone in the future. .
Related articles:
Detailed tutorial on using Angular CLI to generate Angular 5 projects
##jquery implements the dragging file upload loading progress bar function
Analysis of javascript prototype and prototype chain
The above is the detailed content of How to implement random switching code of WeChat ID through JavaScript (detailed tutorial). For more information, please follow other related articles on the PHP Chinese website!