Kopieren Sie den Code -Code wie folgt:
<!
<html>
<kopf>
<meta http-äquiv = "content-type" content = "text/html; charset = utf-8">
<title> jQuery </title>
<script type = "text/javaScript" src = "jQuery-1.7.2.js"> </script>
<script type = "text/javaScript">
$ (function () {
// appret () nutzung
// $ .com "). append 18" abgenutzt = 'ABC'> Hallo </li> ");
// $ .com "). append 18" abgenutzt = 'xyz'> world </li> ");
// Die Verwendung von appendTO ()
$ ("<li title = 'xyz'> Hallo </li>").
});
</script>
</head>
<body>
<p> Glaubst du, San Siyuan -Training ist gut? </p>
<ul>
<li> ok </li>
<li> Sehr gut </li>
<li> Sehr gut </li>
<li> Besonders gut </li>
<li> großartig </li>
<li> Gut kann beschrieben werden </li>
</ul>
</body>
</html>
Auf vorhandenen Knoten arbeiten
Kopieren Sie den Code -Code wie folgt:
<!
<html>
<kopf>
<meta http-äquiv = "content-type" content = "text/html; charset = utf-8">
<title> jQuery4 </title>
<script type = "text/javaScript" src = "jQuery-1.7.2.js"> </script>
<script type = "text/javaScript">
$ (function () {
var li1 = $ (<li title = 'ABC'> Hallo </li> ");
var li2 = $ ("<li title = 'abc'> world </li>");
var li3 = $ ("<li title = 'abc'> Hallo Welt </li>");
$ ("ul").
$ ("ul").
$ ("Ul li: Gl (4)").
});
</script>
</head>
<body>
<p> Glaubst du, San Siyuan -Training ist gut? </p>
<ul>
<li> ok </li>
<li> Sehr gut </li>
<li> Sehr gut </li>
<li> Besonders gut </li>
<li> großartig </li>
<li> Gut kann beschrieben werden </li>
</ul>
</body>
</html>