<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>jQuery演示</title>
    <script type="text/javascript" src="jquery/jquery-3.4.0.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function (){
            $("#showAlert").click(function (){
                alert("这是使用jQuery创建的消息。");
            });
        })
    </script>
</head>
<body>
    <div id="showAlert">单击触发事件</div>
</body>
</html>

需要在jQuery官网下载jQuery的文件,放置在新建文件夹jquery内,让后在<head>中引用。