1
我試圖讓按鈕在每次單擊該按鈕時顯示警報。目前,它僅在我第一次點擊時觸發,我必須刷新頁面才能使其再次運行。因爲這是「提交」和「新建」按鈕,所以我需要它能夠保留重新加載時將丟失的表單值。警報用於向用戶提供反饋。這是我的代碼:JavaScript點擊事件僅在InfoPath表單上第一次觸發
$('input[value="Submit and New"]').on('click', function(){
alert('The request form has been submitted successfully. To submit a new form for the same user, change the form values and click on either the "Submit" or "Submit and New" button');
});