你好,我想请问一下,这部分代码如何改变使原图片被切分成2*2或3*3呢?
for (i = 0, td = document.getelementsbytagname('td'); i < td.length; i++) {
td[i].setattribute('class', 'img' + i);
td[i].setattribute('id', i);
td[i].style.height = "168px";
td[i].style.width = "168px";
td[i].style.position = "absolute";
td[i].style.left = i % _row * (168 + table_cellspacing) + (parseint(i % _row / _row) + 1) * margin + "px";
td[i].style.top = parseint(i / _col) * (168 + table_cellspacing) + "px"; 小白。。没看太懂