jquery有alert,因为jquery是一个JavaScript函数库,并且jquery的代码与JavaScript的原生代码是可以混合存在的,所以可以直接使用alert。

本文操作环境:windows7系统、jquery3.2.1版、DELL G3电脑
jquery 有alert吗?
jquery 有alert,因为jquery是一个JavaScript函数库,JQuery的代码与JavaScript的原生代码是可以混合存在的,所以可以直接使用alert。
比如通过 jQuery text() 和 html() 方法来获得内容:
代码实例
$("#btn1").click(function(){
alert("Text: " + $("#test").text());
});
$("#btn2").click(function(){
alert("HTML: " + $("#test").html());
});推荐学习:《jquery视频教程》










