惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
大猫的无限游戏
大猫的无限游戏
F
Fortinet All Blogs
M
MIT News - Artificial intelligence
G
Google Developers Blog
Hacker News: Ask HN
Hacker News: Ask HN
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Help Net Security
V
Visual Studio Blog
WordPress大学
WordPress大学
博客园 - 司徒正美
TaoSecurity Blog
TaoSecurity Blog
Webroot Blog
Webroot Blog
Hugging Face - Blog
Hugging Face - Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
W
WeLiveSecurity
C
CERT Recently Published Vulnerability Notes
Y
Y Combinator Blog
S
Schneier on Security
Recent Announcements
Recent Announcements
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
宝玉的分享
宝玉的分享
T
Troy Hunt's Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
N
News and Events Feed by Topic
A
About on SuperTechFans
小众软件
小众软件
K
Kaspersky official blog
Help Net Security
Help Net Security
V2EX - 技术
V2EX - 技术
P
Proofpoint News Feed
S
Secure Thoughts
IT之家
IT之家
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
I
Intezer
NISL@THU
NISL@THU
GbyAI
GbyAI
P
Privacy & Cybersecurity Law Blog
T
Threatpost
C
Check Point Blog
Forbes - Security
Forbes - Security
C
Cisco Blogs
AI
AI
Recorded Future
Recorded Future
F
Full Disclosure

博客园 - 猎风

Visio Viewer 2003 & 2007打不开vsd的解决办法,测试有效 项目所需的应用程序未安装,确保已安装项目类型(.csproj)的应用程序的解决办法 - 猎风 - 博客园 utf-8页面调用gb2312页面的js显示乱码的解决方法 Access乱码解决方案 - 猎风 - 博客园 Google小组研发模式分析 如何写系统分析书 十年互联网,十个风云人物——历史会记住他们! SQL Server安装时候提示程序挂起 【Mark】convert函数(SQL) 吊西楚霸王 献给蓝 实用文章:常用开源协议详细解析 毕竟充实 FCKeditor 2.0 的设置.修改.使用 关于asp里面的(do while loop )(while wend )(for next)运行的时间 - 猎风 一份ASP代码编写标准 影响中国软件开发的20人 寂寞沙洲冷 关于ASP中堆栈溢出错误的解决 - 猎风 - 博客园 福布斯评最佳与最差老板 TCL上黑榜 瑞星:关于卡巴斯基起诉瑞星的声明 浏览网页乱码怎么办? 下辈子如果我还记得你 致红叶 互联网名人语录小柳点评版 醉酒诗书喜欲狂 报告:中国消费者买得起打印机用不起墨水 alt属性和title属性 instr WINDOWS所有系统文件的用途 2006 企业级PHP应用软件精彩叠现 js常用页面跳转 - 猎风 - 博客园 终于下定决心了 成功的人永不放弃,放弃的人永不成功! js操作数据库 - 猎风 - 博客园 Web 2.0 编程思想 网站 LOGO 设计简论 按比例缩放图片 - 猎风 - 博客园 JavaScript基础知识
一个form两个提交按钮,分别提交到两页面
猎风 · 2009-07-17 · via 博客园 - 猎风

一个form两个提交按钮,分别提交到两页面

方案一:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>一个form两个提交按钮,分别提交到两页面</title>
<script type="text/javascript">  
    
function save()
    {   
        document.form1.action
="a.asp";
        document.form1.submit();
    }
    
    
function send()
    {
        document.form1.action
="b.asp";
        document.form1.submit();
    }   
</script>
</head>
<body>
<form name="form1">
  
<input type="text" name="username" value="scott">
  
<input type="button" value="发送" onclick="send();">
  
<input type="button" value="保存" onclick="save();">
</form>
</body>
</html>

方案二:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>一个form两个提交按钮,分别提交到两页面</title>
<script type="text/javascript">  
    
function send()
    {
        
if (i==1)
        {document.form1.action
="b.asp";}
        
else
        {document.form1.action
="a.asp";}
        document.form1.submit();
    }   
</script>
</head>
<body>
<form name="form1">
  
<input type="text" name="username" value="scott">
  
<input type="button" value="发送" onclick="send(0);">
  
<input type="button" value="保存" onclick="send(1);">
</form>
</body>
</html>