doubaran2438 2013-02-12 06:46
浏览 17

一键两个动作

i want to submit data from one button in the databse and the same button should export the CSV of the databse, i tried but it doesn't work only dat is being sent i have two buttons

<div class="mws-form-item large">
<input type="submit" class="button" name="submit1" value="Generate Serials" />
<a href="get_csv.php" style="text-decoration:none">
<input type="button" name="get_csv" value="Export CSV"/></a>
</div>

and tried the in the following way
<div class="mws-form-item large">
<a href="get_csv.php" style="text-decoration:none">
<input type="submit" class="button" name="submit1" value="Generate Serials" />
</a>
</div>
  • 写回答

1条回答 默认 最新

  • dongshou6788 2013-02-12 06:51
    关注

    If you can use jQuery, then you can bind click event to the submit button and perform all the operations you need in the function being called after click.

    For eg :

    <input type="submit" id="submitBut">
    

    For this you can have :

    $("#submitBut").click(function(){
    
    //operations you need to perform
    
    })
    
    评论

报告相同问题?

悬赏问题

  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计