问题描述
<script language="JavaScript"><!----></script>
解决方案
function A(i){this._i = i;}A.prototype.alert_i = function() {alert(document.getElementById("div"+this._i));}window.onload=function(){for(var i=0; i<4; i++){a = new A(i);}a.alert_i();}
时间: 2024-11-30 15:35:59