Home  >  Article  >  Web Front-end  >  Does jquery have alert?

Does jquery have alert?

藏色散人
藏色散人Original
2021-12-01 11:43:353374browse

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.

Does jquery have alert?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn