Home > Web Front-end > JS Tutorial > body text

JavaScript micro-signal random switching code implementation code

小云云
Release: 2018-03-12 09:12:30
Original
2184 people have browsed it

Regarding how to implement random switching of WeChat ID in js, this article mainly shares with you the code implementation code of JavaScript WeChat ID random switching, which is divided into js and html parts. I hope it can help everyone.

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[&#39;pathurl&#39;] ?>"+arr_wx[wx_index]+".jpg"
Copy after login

html code:

<script>document.write(stxlwx)</script>
Copy after login

Related recommendations:

10 recommended courses about WeChat ID

The above is the detailed content of JavaScript micro-signal random switching code implementation code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template