<script type="text/javascript">
window.onload = function () {
var imgs = document.images;
for (var i = 0; i < imgs.length; i++)
{
(function (x) {
imgs[x].onclick = function () {
alert(x);
}
})(i);
}
};
</script>
时间: 2024-10-10 10:11:28