<script>
$(function(){
var arr = new Array(
"static/picture/zf.jpg",
"static/picture/gf.jpg",
"static/picture/qi.jpg",
);
var object= document.getElementById("erweima");
object.src=arr[Math.floor(Math.random() * arr.length)];
});
</script>
原文:https://www.cnblogs.com/apolloren/p/13542086.html