EasyUI Forum
September 14, 2025, 07:40:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] Set value to textbox, multiline  (Read 15021 times)
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« on: May 18, 2016, 03:09:41 AM »

Hello
how to set multiline value to textbox from HTML?
If I using it in JS, it works:

$('#tb').textbox('setText', "first\r\nSecond");

but when declaring textbox in the html, it does not display 2 lines, but only one:

<div><input class="easyui-textbox" data-options="multiline:true" id="tb" value="first\r\nSecond"></div>

thank you.
« Last Edit: May 19, 2016, 04:25:24 AM by Pierre » Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: May 18, 2016, 07:17:37 PM »

Please try this code instead.
Code:
<textarea id="tb" class="easyui-textbox" data-options="multiline:true" style="width:300px;height:100px">first
Second</textarea>
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #2 on: May 19, 2016, 04:25:11 AM »

Awesome, it works perfect, thank you.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!