我在前端显示字符串的方式存在问题。我的字符串是一个html代码,我已经保存在数据库中,在后端(PHP)它显示良好,然后,我将它传递给视图,我想在textarea中显示此代码,但它&#39 ; s印刷方式不同,我所拥有的一部分是:
<script src='js/socket.io.js'></script> <script src='js/jQuery-2.2.0.min.js'></script> <link href='styles/style.css' rel='stylesheet' type='text/css' /> <script> // on connection to server, ask for user's name with an anonymous callback $(document).ready(function(){ // when the client clicks SEND var toggl=true; var connected=false; var socket; var currentTime; var hours; var minutes;
但是,我真正想要的是:
<script src='js/socket.io.js'></script> <script src='js/jQuery- 2.2.0.min.js'></script>
<link href='styles/style.css' rel='stylesheet' type='text/css' /> <script> ' $(document).ready(function(){
var toggl=true;
var connected=false;
var socket;
var currentTime;
var hours;
var minutes;
那么,我有哪些选项可以在javascript中获取它?我的意思是说,我不想要标签:&amp; alt,&amp;#039,&amp; gt等等。先谢谢!