1
在我下面的HTMLPython對象未捕獲的SyntaxError:意外的標記<
<script> var scr_obj = {{obj}} </script>
<div class="btn-group btn-group-xs" id="v_u_button" style="float:right;">
<button type="button" class="btn btn-primary" id="view_script">View</button>
<button type="button" class="btn btn-primary" id="update_script">Update</button>
</div>
的{{obj}}
是一個Python對象,它看起來像這樣
<script> var scr_obj = <app.database.models.TestObject object at 0x7fafab336048> </script>
這是擺脫了一個錯誤在我的鉻控制檯Uncaught SyntaxError: Unexpected token <
而且我需要整個對象在變量「scr_obj」中,所以我可以在我的JS中使用它來跟我的燒瓶後端執行我的設備上的其他任務。我怎麼能通過這個?
感謝
您不能在另一個'