我有几个按钮,每个按钮都被分配给一个有数字的类。当我单击每个按钮时,数字将在输入中提交。如果我双击该按钮,我希望从输入中删除该数字/值,但只删除那个数字。
下面是我的例子:
这是我的密码:
$("div").live('click',function() {
var a = $('input').val();
var b = $(this).attr('class')
var c;
if ( $("input").val().indexOf(b) !== -1 ) {
// the cod
我的表单有两个提交按钮。单击提交按钮后,我使用以下代码禁用提交按钮;但是,当提交表单时,它总是触发第一个提交按钮(即使我单击了第二个提交按钮)。我想触发第二个提交按钮。
<script>
$('input[type=submit]').click(function() {
$(this).attr('disabled', 'disabled');
//This line submits the form as if the first button was clicked
$(this).parents(