问题描述
[![] [2]] [2]
[![][2]][2]
推荐答案
如果该图像是您当前的情况,那么您的函数将不再命名为toggle()
,而是命名为toggleControls()
.
If that image is your current situation, then your function is no longer named toggle()
but toggleControls()
.
对于您的脚本标签,您在开始标签的右括号之前留了一个空格:<script >
.
我不确定,但是将其更改为<script>
可能会成功.
As for your script tag, you left a space before the closing bracket of the opening tag: <script >
.
I'm not sure, but changing it to <script>
might do the trick.
作为旁注,在<img src="../MovieLandingPage/images/close.png" class="close"onclick="toggle();>
您缺少onclick
属性的右引号.
而且您应该真正养成用空格分隔属性的习惯,这更具可读性.
As a side note, in<img src="../MovieLandingPage/images/close.png" class="close"onclick="toggle();>
you're missing a closing quotation mark for the onclick
attribute.
And you should really make a habit of separating your attributes by spaces, it's a lot more readable.
这篇关于我的脚本标签发生了什么.为什么它显示红色(错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!