随笔分类 - jsp
摘要:String.prototype.trim = function() {return this.replace(/^\s*/g, "").replace(/\s*$/g, "");};
阅读全文
摘要:p{ margin:0px; padding-left:8px; height:0px; line-height:0px;}
阅读全文
摘要:改默认编辑模式就可以了。将默认编辑器由“myeclipse visual jsp designer”改为“myeclipse jsp editor”就不卡了。(我试验过就很灵)
阅读全文
摘要:地址栏中传递中文参数由于地址栏会将中文参数编码,因而另一个接受页面获取的参数肯定是乱码。应先在提交页面将中文参数编码,接受页面解码,如下:提交页面:<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <body> <% String name = "张三"; String tname = URLEncoder.encode(name,"utf-8"); response.sendR
阅读全文
摘要:那些不支持 JavaScript 的浏览器会把js脚本作为页面的内容来显示。为了防止这种情况发生,可以使用这样的 HTML 注释标签:<html><body><script type="text/javascript"><!--document.write("Hello World!");//--></script></body></html>注释行末尾的两个正斜杠是 JavaScript 的注释符号,它会阻止 JavaScript 编译器对这一行的编译。追问既然是注释,
阅读全文
摘要:HTML <td> 标签的 nowrap 属性nowrap 属性规定表格单元格中的内容不换行。实例带有 nowrap 属性的表格单元:<table border="1"><tr><th>Poem</th><th>Poem</th></tr><tr><td nowrap="nowrap">Never increase, beyond what is necessary, thenumber of entities required to
阅读全文
摘要:1.点击按钮返回 上一页:<input type="submit" value="返回" onclick="javascript :history.back(-1);">2.点击按钮跳转到另一个jsp页面:<input type="button" onclick="window.location='info/register.jsp'" value="快速注册">3.复选框 :<input type=checkbox name=&
阅读全文

浙公网安备 33010602011771号