First: via text/HTML var txt1="<h1>Text.</h1>"; Second: Through jQuery var txt2=$("<h2></h2>").text("Text."); The third method: through JavaScript/DOM var txt3 = document.createElement("h3"); The above summary of three methods of creating new elements is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. Original URL: http://www.cnblogs.com/SoYang/p/5677589.html |
<<: Solution to Navicat Premier remote connection to MySQL error 10038
>>: ReactHooks batch update state and get route parameters example analysis
1. Introduction When we log in to MySQL, we often...
1. Let's look at a table creation statement f...
When checking the service daily, when I went to l...
This article shares the specific code for JavaScr...
Customize a demo command The syntax of Vue custom...
1. The vertical-align property achieves the follo...
Table of contents question Solution question Ther...
1. MySQL self-connection MySQL sometimes needs to...
<br />Adding pictures reasonably can make a ...
Table of contents Normal paging query How to opti...
0x0 Introduction First of all, what is a hash alg...
1. Installation Install using yum ##Automatically...
Table of contents The role of cloneElement Usage ...
Adding the rel="nofollow" attribute to ...
The following installations all use the ~/ direct...