本站首页    管理页面    写新日志    退出 [QQ:172832876] [MSN:lanlanq@hotmail.com]
麒麟在天欢迎您

.:日期

«September 2025»
123456
78910111213
14151617181920
21222324252627
282930

.:我的分类

.:最新日志

.:显示信息

blog名称:
日志总数:64
评论数量:34
留言数量:3
访问次数:342868
建立时间:2006年3月10日

.:留言板

.:链接

        公告

在属于自己的一片天空中,敲打着键盘,记录下自己感兴趣和认为自己因该回忆的碎片,可能是财富,也可能是不足,过后你会发现你的进步,这就足够。
[J2EE]页面局部刷新的一种古老方式,通过javascript变向操作服务器端代码
luckystar 发表于 2006/4/29 9:30:43

login.jsp <%@ page language="java" contentType="text/html; charset=gb2312" %><html> <head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>登记验证</title><script type="text/javascript">function ok(){ document.getElementById('jf').src="submits.jsp?username="+document.iform.username.value + "&password="+document.iform.password.value; return true; }</script></head> <body><form id="iform" name="iform" action=""><table border="0" width="100%"> <tr>  <td>&nbsp;用户名</td>  <td>&nbsp;<input type="text" name="username" size="20"></td> </tr> <tr>  <td>&nbsp;密码</td>  <td>&nbsp;<input type="password" name="password" size="20"></td> </tr> <tr>  <td colspan=2>&nbsp;<button name="sumits" onclick="ok();">提交</button></td>    </tr></table></form> <p><iframe name="jf" id="jf" src="" width="1" height="1">浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe></p> </body> </html> submit.jsp   <%@ page language="java" contentType="text/html; charset=gb2312" %><html> <head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>jforms</title><SCRIPT LANGUAGE="JavaScript">    var rtn=false    function push_me() {        alert("重复数据,是否要进行提交")        document.jform.submit();            }</SCRIPT> <!--<SCRIPT LANGUAGE="VBScript"><!--    Option Explicit    Sub cmdVBS_OnClick         ' This is a VBScript version of the        ' JavaScript function.  VBScript must set        ' and declare variables on separate        ' lines.         Dim MyForm        Set MyForm=Document.frmScript        Dim msg1,msg2                msg1="This is a VBScript message: "        msg2=MyForm.txtMessage.Value        MsgBox msg1 & msg2    End Sub </SCRIPT>--></head> <body onload="push_me()"> <form method="POST" id="jform" name="jform" action="/JFServlet"> <input type=hidden name="username" value="<%=request.getParameter("username")%>"> <input type=hidden name="password" value="<%=request.getParameter("password")%>"> <p><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p></form> </body> </html>  

阅读全文(5808) | 回复(2) | 编辑 | 精华

 


回复:页面局部刷新的一种古老方式,通过javascript变向操作服务器端代码
Jody(游客)发表评论于2010/5/8 23:40:12

你的编辑器效果没有哦!

个人主页 | 引用回复 | 主人回复 | 返回 | 编辑 | 删除

 


回复:页面局部刷新的一种古老方式,通过javascript变向操作服务器端代码
Jody(游客)发表评论于2010/5/8 23:39:11

Hello 页面不错

 


» 1 »

发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)
站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.191 second(s), page refreshed 144778446 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号