Javascript 如何使脚本显示模式?

Javascript 如何使脚本显示模式?,javascript,jquery,pycharm,Javascript,Jquery,Pycharm,我目前正在使用PyCharm作为IDE,我正在youtube上学习一些教程。正如你可能看到的,我是非常非常新的。以下脚本(代码1)不工作,它引用的是模式(代码2)。脚本应在到达时在屏幕上显示模式弹出窗口,而不是在底部显示没有弹出窗口或根本没有弹出窗口。它通过FastAPI显示 代码1(脚本) $(文档).ready(函数(){ $('.ui.modal').modal('show'); }); 代码2(参考:) <script> $(document).ready(functi

我目前正在使用PyCharm作为IDE,我正在youtube上学习一些教程。正如你可能看到的,我是非常非常新的。以下脚本(代码1)不工作,它引用的是模式(代码2)。脚本应在到达时在屏幕上显示模式弹出窗口,而不是在底部显示没有弹出窗口或根本没有弹出窗口。它通过FastAPI显示

代码1(脚本)


$(文档).ready(函数(){
$('.ui.modal').modal('show');
});
代码2(参考:)


<script>
$(document).ready(function() {
  $('.ui.modal').modal('show');
});
</script>
<<div class="ui modal">
  <i class="close icon"></i>
  <div class="header">
    Profile Picture
  </div>
    <div class="description">
      <div class="ui header">We've auto-chosen a profile image for you.</div>
      <p>We've grabbed the following image from the <a href="https://www.gravatar.com" target="_blank">gravatar</a> image associated with your registered e-mail address.</p>
      <p>Is it okay to use this photo?</p>
    </div>
  </div>
  <div class="actions">
    <div class="ui black deny button">
      Nope
    </div>
    <div class="ui positive right labeled icon button">
      Yep, that's me
      <i class="checkmark icon"></i>
    </div>
  </div>
</div>
<script>
$(document).ready(function() {
  $('.ui.modal').modal({show:true});
});
</script>