不错呦!smile@林凯西,确保“准备文件”中的几个文件都有安装,S...您好,看了您这篇帖子觉得很有帮助。但是有个问题想请...我的修改过了怎么还被恶意注册呢 @jjjjiiii 用PJ快9年了,主要是A...PJ3啊,貌似很少有人用PJ了,现在不是WP就是z...@332347365,我当时接入时错误码没有-10...楼主,ChkValue值应为-103是什么意思呢?...大哥 你最近能看到我发的信息,请跟我联系,我有个制...
动态改变表单action的值
编辑:admin 日期:2006-10-19
有时根据实际需要会设置不同的按钮,当点击不同的按钮时将同一表单发送到不同的页面中进行处理,这就需要动态的改变表单action的值,实现方法如下:
<!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=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
function fun1(){
document.form1.action="asp1.asp";
document.form1.submit();
return true;
}
function fun2(){
document.form1.action="asp2.asp";
document.form1.submit();
return true;
}
</script>
<body>
<form id="form1" name="form1" method="post" action="">
<input type="button" name="Submit" onclick="fun1();" value="收藏" />
<input type="button" name="Submit2" onclick="fun2();" value="提交" />
</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=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
function fun1(){
document.form1.action="asp1.asp";
document.form1.submit();
return true;
}
function fun2(){
document.form1.action="asp2.asp";
document.form1.submit();
return true;
}
</script>
<body>
<form id="form1" name="form1" method="post" action="">
<input type="button" name="Submit" onclick="fun1();" value="收藏" />
<input type="button" name="Submit2" onclick="fun2();" value="提交" />
</form>
</body>
</html>






评论: 1 | 引用: 0 | 查看次数: 4844
发表评论
请登录后再发表评论!