[You must be registered and logged in to see this link.]
Hướng dẫn:
ACP >> Modules >> HTML & JAVASCRIPT >> Javascript codes management >> Create a new javascript
Title * : Cảnh báo khi đóng trình duyệt
Placement : In all the pages
Javascript Code * :
Hướng dẫn:
ACP >> Modules >> HTML & JAVASCRIPT >> Javascript codes management >> Create a new javascript
Title * : Cảnh báo khi đóng trình duyệt
Placement : In all the pages
Javascript Code * :
- Code:
$(function () {
$("#text_editor_textarea").length && ($(window).on("beforeunload", function () {
if ($("#text_editor_textarea").sceditor("instance").val().length >= 10) return "Bài viết của bạn chưa được lưu."
}), $("form[name='post']").submit(function () {
$(window).off("beforeunload")
}));
});
nguồn : [You must be registered and logged in to see this link.]