当前位置:编程学习 > JAVA >>

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 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,