第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

運行時替換的 Index.html 腳本標記值

運行時替換的 Index.html 腳本標記值

MMTTMM 2021-11-18 20:44:30
我在使用 CORS 和網頁時遇到問題:在頁面加載之前更改網頁值但沒有發(fā)生在任何其他頁面上我無法使用 jQuery 正確加載主頁但具有相同腳本的所有其他頁面加載正常不適用于 Chrome但適用于本地和 Firefox更改了 S3 CORS 配置權限,但尚未解決問題AWS S3 存儲桶 > 權限 > CORS 配置<!DOCTYPE html><html>    <head>        <script            type="text/javascript" crossorigin="anonymous">$(function () { $.get("assets/head.html", function (data) { $("head").prepend(data); }); });</script>    </head>     <body class="container">    </body></html>變成:<!DOCTYPE html><html>    <head>        <script            type="text/javascript" crossorigin="anonymous">$(function () { $.get("https://s3-example.amazonaws.com/aws-codestar-example/public/assets/head.html", function (data) { $("head").prepend(data); }); });</script>    </head>     <body class="container">    </body></html>錯誤是:Access to XMLHttpRequest at 'https://s3-example.amazonaws.com/aws-codestar-example/public/assets/head.html' from origin 'http://example2.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.為什么源在 Chrome 讀取之前會發(fā)生變化?
查看完整描述

1 回答

?
繁星點點滴滴

TA貢獻1803條經驗 獲得超3個贊

在另一個頁面中編寫腳本并將其鏈接到底部的 head 或 body 標簽中。就像:


<script src="Right the link page" type="text/javascript">

function...

</script>

</body>

或者:


<script type="text/javascript" src="Right the link page">

  function...

</script>

</head>

在head標簽中編寫腳本語言并嘗試在底部 body 標簽中。就像:


<script type="text/javascript">function...

</script>`

</body>

或者


<script type="text/javascript"></script>`

</head>

不是請刪除您的瀏覽器歷史記錄,并關閉所有選項卡而不是瀏覽器選項卡中的 URL 并運行。


查看完整回答
反對 回復 2021-11-18
  • 1 回答
  • 0 關注
  • 111 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號