31 July 2017

LÀM SAO ĐỂ CHẠY JQUERY?

LÀM SAO ĐỂ CHẠY JQUERY?
JQuery 2017
<!DOCTYPE html>
<html>
    <head>
        <title>Demo</title>
        <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
        <script type="text/javascript">
            function init() {
                if (false) {
                    window.alert("Update thành công!");
                    location.replace("https://www.google.com.vn");
                } else {
                    window.alert("Error!");
                }
            }
            $(document).ready(function () {
                $("#loginBtn").click(function () {
                    if (confirm("Chúc mừng bạn login thành công!")) {
                        document.update.submit();
                    }
                });
            });
            $(function () {
                $("#submitBtn").click(function () {
                    if (confirm("Bạn có muốn update không?")) {
                        document.update.submit();
                    }
                });

                $("#cancelBtn").click(function () {
                    if (confirm("Bạn có chắc chắn thoát trang này không?")) {
                        //Quay ve dau?
                    }
                });
            });
        </script>
    </head>
    <body onload="init()">
        <form name="update" action="https://giai-ma.blogspot.com" method="GET">
            <input type="button" value="Login" id="loginBtn"/>
            <input type="button" value="OK" id="submitBtn"/>
            <input type="button" value="Cancel" id="cancelBtn"/>
        </form>
    </div>
</html>

Related Posts:

  • jQuery Effects jQuery Fade jQuery 2016 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("#… Read More
  • jQuery Traversing jQuery Ancestors jQuery 2016 jQuery parent() //Chỉ hiển thị CSS thẻ <li> bao bọc thẻ <span> <style> .ancestors * { display: block; border: 2px solid lightgrey; color: lightgrey; … Read More
  • jQuery HTML jQuery Get jQuery 2016 Click #btn1 hiển thị nội dung nằm trong #test là kiểu text Click #btn2 hiển thị nội dung nằm trong #test là kiểu html <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.m… Read More
  • jQuery: Date picker sử dụng jQuery Input type text date Format dd/mm/yyyy Date picker với jQuery jQuery 2017 <html> <head> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="http://code.jq… Read More
  • jQuery: Validate form đơn giản nhất với jQuery Validate thường với jQuery jQuery 2017 $(document).ready(function() { $("#save").on('click', function() { // BƯỚC 1: Lấy dữ liệu từ form var soHoaDon = $('#soHoaDon').val(); var ng… Read More

0 nhận xét:

Post a Comment

 

BACK TO TOP

Xuống cuối trang