在JavaScript程序中整合Java函数 - 编程入门网
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-22
E1")) s2 = "#F7F7F7"; else s2 = "#D5E6E1"; } stringbuffer.append("</table>" + NEWLINE); stringbuffer.append("<br><br>"); stringbuffer.append("<table>" + NEWLINE); stringbuffer.append("<tr>"); if(inst.size() > 0) stringbuffer.append("<td align=left nowrap><input type=button value=Delete onClick="fun(''delete'');"></td>"); else stringbuffer.append("<td nowrap></td>"); stringbuffer.append("<td nowrap> </td>"); stringbuffer.append("<td align=right nowrap>对象名<input type=text size=10 name="oname"> 类名<input type=text size=18 name="JinJ">参数<input type=text name="params">"); stringbuffer.append("<input type=button value=Add onClick="fun(''add'');"></td></tr>"); stringbuffer.append("</table>" + NEWLINE); stringbuffer.append("</form>"); return stringbuffer.toString(); } file://分析文件 private void parseFile(String s, HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws IOException { String s1 = getUrl(httpservletrequest); String s2 = getFile(s, httpservletrequest); httpservletresponse.setContentType("text/html"); PrintWriter printwriter = httpservletresponse.getWriter(); printwriter.println("<html>"); if(s1 == null) { printwriter.println("<br>找不到servlet名.请检查初始参数"); } else { printwriter.println("<frameset rows="*,100%" border=0>"); printwriter.println("<frame name="hframe" src="" + s1 + "?" + "what" + "=" + "hframe" + "">"); printwriter.println("<frame name="mframe" src="" + s1 + "?" + "what" + "=" + "mframe" + "&" + "df" + "=" + s2 + "">"); printwriter.println("</frameset>"); } printwriter.println("</html>"); printwriter.flush(); printwriter.close(); } private String getId()//取ID命令,使用当前的时间配合随机数产生的是唯一值 { String s = ""; synchronized(SessionIdLock) { long l = System.currentTimeMillis(); Random random = new Random(); s = String.valueOf(l); for(int i = 1; i <= 6; i++) s = s + (int)(1.0D + 6D * random.nextDouble()); } return s; } private String randomValue(String s, String s1)//取随机数 { Random random = new Random(); int i; int j; try { i = Integer.parseInt(s); j = Integer.parseInt(s1); } catch(Exception _ex) { return "对于random()无效的参数值"; } return String.valueOf((int)((double)i + (double)j * random.nextDouble())); } private void executeRequest(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) file://执行请求 throws IOE |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于在JavaScript程序中整合Java函数 - 编程入门网的所有评论