jquery has alert, because jquery is a JavaScript function library, and jquery code and JavaScript native code can be mixed, so alert can be used directly.
The operating environment of this article: windows7 system, jquery version 3.2.1, DELL G3 computer
#Is there an alert for jquery?
jquery has alert, because jquery is a JavaScript function library, JQuery code and JavaScript native code can be mixed, so alert can be used directly.
For example, obtain content through jQuery text() and html() methods:
Code examples
$("#btn1").click(function(){ alert("Text: " + $("#test").text()); }); $("#btn2").click(function(){ alert("HTML: " + $("#test").html()); });
Recommended learning: "jquery video tutorial"
The above is the detailed content of Does jquery have alert?. For more information, please follow other related articles on the PHP Chinese website!