用js/jquery 怎么让li 每次刷新都随机排列 20
<LI><Aclass=icoTchref="tencent://message/?uin=3888888&Site=&Menu=yes"target="_blank"r...
<LI><A class=icoTc href="tencent://message/?uin=3888888&Site=&Menu=yes" target="_blank" rel="nofollow">177773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394688398&Site=&Menu=yes" target="_blank" rel="nofollow">27773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=3946355&Site=&Menu=yes" target="_blank" rel="nofollow">3773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394677398&Site=&Menu=yes" target="_blank" rel="nofollow">47773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394666398&Site=&Menu=yes" target="_blank" rel="nofollow">57773946398</A></LI>
qq客服代码,我想每次刷新网页都能重新排列一次,如何实现? 展开
<LI><A class=icoTc href="tencent://message/?uin=394688398&Site=&Menu=yes" target="_blank" rel="nofollow">27773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=3946355&Site=&Menu=yes" target="_blank" rel="nofollow">3773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394677398&Site=&Menu=yes" target="_blank" rel="nofollow">47773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394666398&Site=&Menu=yes" target="_blank" rel="nofollow">57773946398</A></LI>
qq客服代码,我想每次刷新网页都能重新排列一次,如何实现? 展开
2个回答
展开全部
<ul id="kf_ul">
<LI><A class=icoTc href="tencent://message/?uin=3888888&Site=&Menu=yes" target="_blank"
rel="nofollow">177773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394688398&Site=&Menu=yes" target="_blank"
rel="nofollow">27773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=3946355&Site=&Menu=yes" target="_blank"
rel="nofollow">3773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394677398&Site=&Menu=yes" target="_blank"
rel="nofollow">47773946398</A></LI>
<LI><A class=icoTc href="tencent://message/?uin=394666398&Site=&Menu=yes" target="_blank"
rel="nofollow">57773946398</A></LI>
</ul>
<script type="text/javascript">
$(function () {
$("#kf_ul").html($("#kf_ul li").sort(function(a,b){return Math.random() - 0.5}));
});
</script>
展开全部
<script type="text/javascript">
var lis = ['<LI><A class=icoTc href="tencent://message/?uin=3888888&Site=&Menu=yes" target="_blank" rel="nofollow">177773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=394688398&Site=&Menu=yes" target="_blank" rel="nofollow">27773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=3946355&Site=&Menu=yes" target="_blank" rel="nofollow">3773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=394677398&Site=&Menu=yes" target="_blank" rel="nofollow">47773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=394666398&Site=&Menu=yes" target="_blank" rel="nofollow">57773946398</A></LI>'];
//随机生成li
lis = lis.sort(function () {
return (Math.round(Math.random()) - 0.5);
});
$(function () {
for (var i = 0; i < lis.length; i++) {
$("#panel").append(lis[i]);
}
});
</script>
<div id="panel"></div>
var lis = ['<LI><A class=icoTc href="tencent://message/?uin=3888888&Site=&Menu=yes" target="_blank" rel="nofollow">177773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=394688398&Site=&Menu=yes" target="_blank" rel="nofollow">27773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=3946355&Site=&Menu=yes" target="_blank" rel="nofollow">3773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=394677398&Site=&Menu=yes" target="_blank" rel="nofollow">47773946398</A></LI>',
'<LI><A class=icoTc href="tencent://message/?uin=394666398&Site=&Menu=yes" target="_blank" rel="nofollow">57773946398</A></LI>'];
//随机生成li
lis = lis.sort(function () {
return (Math.round(Math.random()) - 0.5);
});
$(function () {
for (var i = 0; i < lis.length; i++) {
$("#panel").append(lis[i]);
}
});
</script>
<div id="panel"></div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询