首页 > 解决方案 > 为什么会有一个

问题描述

I am new to react and am running a simple application (following tutorial at https://reactjs.org/tutorial/tutorial.html and modifying code for my own project).

I see a

<noscript>
You need to enable JavaScript to run this app.
</noscript>

in my HTML, not sure if that is breaking something or why it is there. Any help is appreciated, I can give code samples if necessary but I have no idea where the noscript is coming from

标签: javascriptreactjs

解决方案


这是因为 React 是一个 Javascript 库并且根据w3schools noscript 标签定义

<noscript>如果脚本不受支持或在用户的浏览器中被禁用,则将显示元素内的内容。

该元素可用于<head><body>

<head>元素内部使用时:<noscript>必须仅包含 <link><style><meta>元素。


推荐阅读