onclick
当用户在输入字段中插入数量时,我正在尝试更新内部的函数参数。
HTML
<input type="text" id="quantity1" class="quantity_class" />
<input type="submit" id="onclick1" class="quantity_class" value="Add to cart" />
JavaScript
$('#quantity1').keyup(function () {
$('#onclick1').attr('onclick', 'func(1,?)');
});
现在如何?
用用户提供的数量值替换?