我要创建两个HTML表单的提交按钮形式两个提交按钮重定向到两个不同的网址
它们都有捕获数据,然后重定向到不同的页面
我用这个代码
<input type="button" name="submit1" value= "submit" onclick="first();">
<input type="button" name="Submit2" value= "submit and refill "onclick="second();">
,并在头I中定义的函数
`
**<script type="text/javascript">
function sub() {
new name.target = 'https://www.google.com';
new name.submit();
}
function subr() {
new name.target = 'https://www.gmail.com';
new name.submit();
}
</script>**
,但它不工作。我只需要使用JavaScript和HTML
plzzz plzzz帮助!
你的函数有错误的名字? – adeneo 2013-04-04 10:38:41
'first()'和'second()'函数在哪里? – 2013-04-04 10:38:48