1<textarea id="txtid" name="txtname" rows="4" cols="50" maxlength="200">
2A nice day is a nice day.
3Lao Tseu
4</textarea>
1textarea {
2 resize: none;
3 white-space: nowrap;
4 overflow-x: scroll; /* or hidden */
5}
1// To set the textarea value, you must insert the TEXT into the element.
2<textarea>VALUE</textarea>
3// javascript
4var textarea = `<textarea>${value}</textarea>`;
5document.getElementById('my_textarea_id').textContent = 'foo'
6// php
7$value = 'foo';
8$textarea = "<textarea>$value</textarea>";
9echo $textarea;