javascript - iframe 内的基本网址无法正常工作
问题描述
我在该网络应用程序上托管了一个网络应用http://localhost:3000
程序,我有一个 iframesrc="http://localhost:8000
我的问题是,即使我在 iframe 中有基本标记,也http://localhost:3000
使用该 iframe 内的相对路径http://localhost:8000
主要.html:http://localhost:3000
<iframe src="http://localhost:8000"></iframe>
iframe.html:http://localhost:8000
<!DOCTYPE html>
<html lang="en">
<head>
<base href="http://localhost:8000/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="/static/assets/css/index.css">
<!-- this is using http://localhost:3000 instead of http://localhost:8000 -->
</head>
<body>
</body>
</html>
我在某处做错了吗?
解决方案
推荐阅读
- python - 烧瓶和保留连接对象
- excel - 如果我按另一列对轴进行排序,DAX Measure 不再准确计算?
- python - IBapi Python - 从 reqHistoricalData 获取最后价格作为变量?
- office365 - 使用 Office 插件插入可点击的图像或对象
- c# - 多次下载 SQL Server Reporting Service 和 C#
- python - Numpy:在各种索引处将任意数量的零插入矩阵行
- python - 试图提示目录选择菜单
- excel - 如何在 oracle 中使用 YEARFRAC
- reactjs - 将 offsetLimitPagination 与过滤 Apollo Graphql 相结合
- c# - 运动取决于帧速率。我怎样才能让它独立于帧速率