[英]Css - adding <!DOCTYPE html> make the browser ignore my animation
[英]Web Browser is Adding Text to my HTML Link
所以我正在使用這段代碼:
<script>
var panel1 = Math.random()
</script>
<a href="//files.explosm.net/rcg/" target=_blank onclick="location.href=this.href+panel1+panel1+panel1+'.png';return false;">Repetitive Comic</a>
但每當我點擊“Repetitive Comic”時,我會收到一個格式為“file://files.explosm.net/rcg/*.png”的網址,其前面有一個意外的“文件:”我不想要。 這是我的代碼正在做的事情,我不知道或是我的瀏覽器(谷歌瀏覽器)?
您必須將其作為本地HTML文件運行,而不是通過HTTP訪問。 所以任何URL都以:
//
...將繼承與本地文件相同的“協議”,在本例中為file://
。
如果您不想要file://
請https:
http:
或https:
file://
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.