<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
js代码:
$(function() {
$("#btn1").bind("click", function () {
alert("点击登录了");
});
});
你用的是jquery的方式来获取元素,你没有引入jquery的js阿
少引js吧,jquery的js
通过document.getElementById();方法获取你要用的节点
要不就是没引用jquery,要不就是button的id错了