Hello! It's a great pleasure to have you visit my blog.
It's truly a fateful encounter. If you are interested in Chinese goods, we can collaborate.
I can provide you with affordable Chinese products that you can sell in your country, thereby boosting our economic income.


If you are willing to cooperate, I hope to hear from you to discuss the opportunity for collaboration.
Here is my Email: t@29ym.com
Looking forward to connecting with you and embarking on this partnership together!

Js实现微信号随机展示切换

在有些网站里面, 要用到微信号,但是不想固定一个微信号,每次刷新变换不同的微信。
例如:第一次进入页面显示微信A,然后刷新显示微信B以此类推实现微信号随机切换展示。
实现代码如下

    var arr_wx = ['A','B']//此处填写微信号  
    var wx_index = Math.floor((Math.random() * arr_wx.length));
    stxlwx = arr_wx[wx_index];
    var wx = "<img width='210' src='img/"+stxlwx+".jpg'>";//此处同步微信号和二维码
页面调用方法
<script>document.write(stxlwx);</script>//此处在页面显示微信号
<script>document.write(wx);</script>//此处在页面显示微信二维码
发表新评论