button标签disabled以后,click事件就无效了。而span标签disabled以后,click事件还是有效的!
如下代码,用来测试:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>禁用测试</title>
<script src="js/jquery-3.3.1.min.js" type="text/javascript"></script>
</head>
<body>
<div>
<input id="mybtn" type="button" value="clickme"/>
<span id="num">0</span><br/>
<span id="myspan">clickme</span>
</div>
</body>
<