0
Help with add text to text box button
Is it possible to add specified text in textbox (adding text only not replacing already existing text) textbox is in html form format. The specific text to be added is few lines only. If it's possible can you please show me how? If possible plz use javascript. Thank you in advance.
4 Answers
+ 4
//Here is a code
<body>
<input type="text" id="test">
<button onClick="add()">add text</button>
</body>
<script>
function add(){
document.getElementById("test").value="hello "
}
</script>
0
Thanks buddy I will try it in my code
0
Problem with the code is it replaces text not adding text to existing one. any solution for this?
0
Never mind I solved it