我在 HTML 文件中有一些 JS 代碼 as <script></script>,但是后端計(jì)算是由 python 進(jìn)行的,在pycharm 中,這個(gè) py 代碼被識(shí)別并且運(yùn)行良好,但是在 vs 代碼中被檢測(cè)為一個(gè)問題:'(' 預(yù)期。js我的問題是,為什么 VS 代碼會(huì)將此檢測(cè)為錯(cuò)誤,我該如何解決?<script> document.getElementById("switch").style.visibility = "hidden"; document.getElementById("stay").style.visibility = "hidden"; {% if error %} #this code is python, not JS alert('{ error }') {% endif %} var clicked = false; var randomize = Math.random(1,4); function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex;
Visual Studio 代碼無法識(shí)別 JavaScript 中的 Python 代碼
慕無忌1623718
2021-09-30 16:46:50