我有 3 个输入(JqueryMobile 的自动完成)。使用此功能:
$('.ui-input-clear').attr('onclick', 'delete_email();');
我将 onclick 事件添加到每个清除按钮,但我只能删除同一个按钮的输入怎么办?
例子:
[<------INPUT------>] [BUTTON] //If I click, the value of THIS input turns ""
[<------INPUT------>] [BUTTON] //If I click, the value of THIS input turns ""
[<------INPUT------>] [BUTTON] //If I click, the value of THIS input turns ""