jquery 有alert吗
时间:2022-02-11 17:20
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() 方法来获得内容: 代码实例 推荐学习:《jquery视频教程》 以上就是jquery 有alert吗的详细内容,更多请关注gxlsystem.com其它相关文章!$("#btn1").click(function(){
alert("Text: " + $("#test").text());
});
$("#btn2").click(function(){
alert("HTML: " + $("#test").html());
});