前提
以下のYoutubeを観ながらJava Scriptでゲームを作るプログラミングをしていたのですが、エラーコードがでます。
BootstrapやBoiler Plate htmlからコードを引っ張ってくださいとYoutubeで言っているのでそのまま従いますが、
Youtube内のコードと引っ張ってきたコードが違い困っています。
一応Youtube内を写生したのですが、Google Chromeで実行するとエラーコードが出ます。
実現したいこと
ここに実現したいことを箇条書きで書いてください。
- ▲▲機能を動作するようにする
発生している問題・エラーメッセージ
Failed to find a valid digest in the 'integrity' attribute for resource 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css' with computed SHA-384 integrity '9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk'. The resource has been blocked. HTMLCollection(3) index.html:1 Access to internal resource at 'file:///C:/Users/Hiro/Desktop/WebPages/Java%20Script/game/site.webmanifest' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https, isolated-app.
該当のソースコード
html
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="site.webmanifest"> <link rel="apple-touch-icon" href="icon.png"> <!-- Place favicon.ico in the root directory --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwA0H8WgZl5MyyxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> <meta name="theme-color" content="#fafafa"> </head> <body> <div class="container"> <div id="js-question" class="mt-3 alert alert-primary" role="alert"> A simple primary alert-check it out! </div> <div class="d-flex justfy-content-center"> <button type="button" class="btn btn-primary">Primary</button> <button type="button" class="ml-1 btn btn-primary">Primary</button> <button type="button" class="ml-1 btn btn-primary">Primary</button> <button type="button" class="ml-1 btn btn-primary">Primary</button> </div> </div> <script src="app.js"></script> </body> </html>
CSS
const question = 'ゲーム市場、最も売れたゲーム機は次の内どれ?'; const answers = [ 'スーパーファミコン', 'プレイステーション', 'ニンテンドースイッチ', 'ニンテンドーDS' ]; const correct = 'ニンテンドーDS'; console.log(document.getElementsByTagName('div'));
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
Sublime Textを使ってみました。