JS:使用JQuery通过后代选择器触发方法
HTML部分:
<div id="myDiv">
<button>点击我</button>
</div>
JQuery部分:
$("#myDiv button").click(function() {
alert("Hello World!");
});
let today = new Beginning();
Click the left button to use the catalog.
JS:使用JQuery通过后代选择器触发方法
<div id="myDiv">
<button>点击我</button>
</div>
$("#myDiv button").click(function() {
alert("Hello World!");
});
This article was last edited at 2023-05-10 15:39:00