我开口从JavaScript的HTML文件,该文件是index.html
.Theindex.html
是在另一个文件夹(指数)根文件夹下。当index.html
打开,则网址www.abc.com/index/
我想从 url 中删除或隐藏文件夹名称索引。url 应该只显示
www.abc.com
在我重定向页面的任何地方。我正在打开index.html
使用window.open
window.open("/index/","_self");
Run Code Online (Sandbox Code Playgroud) 我的网页首先打开app.html.点击登录后我需要打开我在iframe中打开的index.html,然后在javascript.so中动态创建iframe打开我附加到document.body的框架.但是它附加到app.html的正文.但我需要在新页面中打开
var el = document.createElement("iframe");
el.setAttribute('id', 'ifrm');
el.setAttribute('name', 'ifrm');
el.setAttribute('src', '/index/index.html');
el.setAttribute('width', '100%');
el.setAttribute('height', '100%');
el.setAttribute('scrolling', 'no');
document.body.appendChild(el);
Run Code Online (Sandbox Code Playgroud)