duanbi8089 2011-05-20 07:19 采纳率: 100%
浏览 47
已采纳

如何只用一个提交按钮提交两个值?

Hey im making a website were you can send other users emails.

My problem is when I go and submit it doesn't submit both values?

my Form has a text box where the user wants to send the email and another is a text area which is the message.

and i don't want 2 submit buttons

  • 写回答

5条回答 默认 最新

  • duan0514324 2011-05-20 09:10
    关注
    <html>
    <head>
    /*... your code here
    ...*/
    </head>
    <body>
    <form name='sampleForm' action='sample.htm' onsubmit='ValidatethisForm()' method="post" enctype="multipart/form-data">
       <input type='text' name='formElem1'>
       <textarea name='formElem2'></textarea>
       <input type = 'submit' value='submit'>
    </form>
    </body>
    
    </html>
    

    In the validate function once u finish your validations use "return true" to proceed. You can submit multiple form elements as long as they have different name attributes and the are within your form tag.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 本题的答案是不是有问题
  • ¥15 关于#r语言#的问题:(svydesign)为什么在一个大的数据集中抽取了一个小数据集
  • ¥15 C++使用Gunplot
  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 蓝桥杯单片机第十三届第一场,整点继电器吸合,5s后断开出现了问题
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 Arcgis相交分析无法绘制一个或多个图形