jsp与javaScript,Sql结合的扫雷,程序中方格总是错位
代码段:
<%
StringBuffer strDisplay=new StringBuffer("<table border=0 cellpadding=0 cellspacing=0> ");
strDisplay=strDisplay.append("<tr><td align=left height=").append(iGameHeight*16).append(
" width=").append(iGameWidth*16).append(">");
for(int i=0;i<iGameHeight;i++){
for(int j=0;j<iGameWidth;j++){
strDisplay=strDisplay.append("<img border=0 src='img/mask.gif' id='cell").append(
i).append("_").append(j).append("'");
strDisplay=strDisplay.append("ondbclick='dbClickCell(").append(
i).append(",").append(j).append(")'");
strDisplay=strDisplay.append("onmousedown='clickCell(").append(
i).append(",").append(j).append(")'></img>");
}
}
红色字是我用的图片做每个表格 jsp javascript sql
补充:Java , Web 开发