<h2>Skills</h2>
<label for="skills">Choose your skills</label>
<input id="skills" type="text"/>
Please note my english is not good. So i can't tell you more.
I just want to render each skill in each div.
my jquery code(separated by comma) is :
$("input#skills").keydown(function(e){
if(e.which===188){
var skbl = $.trim($("input#skills").val());
$("input#skills").append("<div style='background:green;'>"+skbl+"</div>");
});
The <div> tag defines a division or a section in an HTML document. The <div> tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript. The <div> tag is easily styled by using the class or id attribute.
You can call $("#myText"). val() to get the text of the text box, and $("#txtDiv"). text(txtToAppend) to append it to the div.
You can't place any element inside an input. An input does not contain any HTML. Save this answer.
You can't place any element inside an input. An input does not contain any HTML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With