2
我有以下Bootsrap形式:提交按鈕沒有反應的回車鍵
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×,
</span>
</button>
<h4 class="modal-title">Datei speichern
</h4>
</div>
<div class="modal-body">
<p>Gib einen Dateinamen ein
</p>
<div class="form-group">
<label class="input-label" for="project-bar-input">
</label>
<input type="text" class="form-control" id="project-bar-input">
</div>
</div>
<div class="modal-footer">
<button type="button" class="modal-cancel btn btn-default" data-dismiss="modal">Abbrechen
</button>
<button type="submit" class="modal-action btn btn-primary" data-dismiss="modal">Speichern
</button>
</div>
</div>
我試圖抓住與
$(".modal-content").find("input#submit").click(function() {
// submit
});
的ENTER鍵事件看完後:
但它不起作用。爲什麼?