You could create a <span>
element and then use jQuery selector to set the html of that element.
Here is an example:
<div class = "box"><span class="span"></span>user</div>
<script type="text\javascript">
$(".box .span").html("Hello ");
</script>
More Related Contents:
- Highlight a word with jQuery
- What is the most efficient way to create HTML elements using jQuery?
- Render HTML to an image
- Sorting options elements alphabetically using jQuery
- HTML Table to Excel Javascript
- Why is it bad practice to use links with the javascript: “protocol”?
- How to avoid the need for ctrl-click in a multi-select box using Javascript?
- Get JSON data from external URL and display it in a div as plain text
- Can I get image from canvas element and use it in img src tag?
- Is it possible to access Shadow DOM elements through the parent document?
- How to get all checked checkboxes
- Reset select value to default
- How to get all the applied styles of an element by just giving its id?
- How to develop Desktop Apps using HTML/CSS/JavaScript? [closed]
- Counting and limiting words in a textarea
- Writing file to desktop using HTML5 FileSystem API
- contentDocument for an iframe
- make checkbox behave like radio buttons with javascript
- Change iframe src by clicking a link
- How to generate a thumbnail image after adding an image inside an input type=”file” in a form and submitting them both on the same form
- Proper way to reset a GIF animation with display:none on Chrome
- How can I prevent refresh of page when button inside form is clicked?
- Javascript Marquee to replace tags
- Dynamically change the size of the font size based on text length
- How do I capture a key press (or keydown) event on a div element?
- Passing JSON data from php to html-data attribute and then to Javascript
- How to keep the header static, always on top while scrolling?
- How does HTML tags work inside script tag?
- Convert JavaScript variable value to csv file
- Chrome Extension get selected text