change text of paragraph jquery
$(yourElement).html("New text");
//sets yourElement innerHTML to "New text"
var text = $(yourElement).html();
//html() returns the text inside yourElement if you pass no parameters.text("new text")<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>text demo</title>
<style>
p {
color: blue;
margin: 8px;
}
b {
color: red;
}
</style>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
</head>
<body>
<p id="pda">Salom html.</p>
<p></p>
<script>
$("#pda").html("New text");
</script>
</body>
</html>
Also in JavaScript:
- discord.js download
- two sum javascript
- javascript for loop return index
- regular expression arabic and persion
- javascript time execution
- get query string javascript nodejs
- readonly attribute in html by javascript
- syntax to call item from array
- how to create an array in node js
- javascript get data attribute of selected option
- sweet alert add custom button
- javascript settimeout
- if button is keeping pressed execute increment javascript
- how to run an express app
- anonymous function javascript
- jquery iterate obj
- how to get a value into a react component
- icon api node js to browser
- print element by xpath javascript
- hide checkbox jquery
- deduplicate array javascript
- content editable vuejs
- comment in jsp file
- javascript check if variable is number