如何将字符串格式化为HTML中的代码
我有此代码作为对象的一部分返回,并将其存储为类型字符串。这就是它存储的方式:
def helloWorld(): print("hello World")helloWorld()
如您所见,它全部都在一行上的一个字符串中。
在html中,我像这样访问它:
<textarea type="text" class="form-control" name="output" id="exampleInputPassword1" style="height: 300px;" readonly><%= recordData.output %></textarea>
现在,我希望能够格式化&lt;%= recorddata.output%&gt;
作为代码,以使其不在一行中。这是否可以通过HTML
或JS
进行?
I have this code which is returned as a part of an object, and is stored as type string. this is the way it is stored:
def helloWorld(): print("hello World")helloWorld()
as you can see, it is all in one string on one line.
In html, i am accessing this like so:
<textarea type="text" class="form-control" name="output" id="exampleInputPassword1" style="height: 300px;" readonly><%= recordData.output %></textarea>
now, I want to be able to format <%= recordData.output %>
as code so that it isn't in one line. is this possible either through html
or js
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论