<script type="text/javascript"> var jschars = ['0','1','2','3','4','5','6','7','8','9']; function generateMixed(2) { var res = ""; for(var i = 0; i < n ; i ++) { var id = Math.ceil(Math.random()*35); res += jschars[id]; } return res; } </script>
JSP页面插入了一个图片<img src="../png/yscjzcl.png?id=xxxxx"></img>,怎么把这个JS生成的随便数放在ID后面,是怎么写的啊? [最优解释] 你个img设定一个ID 比如 "image" <img id ="image" src="..