Hi,
There is a XTemplate Object and a json Object. Like this:
Now it only displays like this:Code:var data = { name: 'Jack Slocum', company: 'Ext JS\nLLC', sex: 'Boy' } var tpl = new Ext.XTemplate( '<p>{name}</p>', '<p>{company}</p>', '<p>{sex}</p>' ); tpl.overwrite(p.body, data);
Jack Slocum
Ext JSLLC
Boy
But I want to replace the "\n" with </br>, and let it display like this:
Jack Slocum
Ext JS
LLC
Boy
Yes, it changes lines. So how shall I do?
Help please!~Thanks first!~