简体   繁体   English

如何使用javascript打开表格单元格内的aspx页面

[英]how to open aspx page inside of a table cell using javascript

In my Project I have a table on which I use a cell in order to open various pages with different works. 在我的项目中,我有一个表格,我使用一个单元格来打开具有不同作品的各种页面。
I use that script: 我用那个脚本:

Dim url As String = "../../Pages/Support/Asp/Help01.aspx"

Dim msg As String = "<script type='text/javascript'> 
document.getElementById('iFrame').innerHTML = " +
"$(document).ready(function(){  window.location.href='" + url + "';  }); 
</script>"

Page.ClientScript.RegisterStartupScript(Me.GetType(), "myURL", msg)

For this purpose. 以此目的。 But what I get is to close the current page and open (in full screen) the new page. 但我得到的是关闭当前页面并打开(全屏)新页面。
How can I make the new page to open inside of the table cell which I want. 如何在我想要的表格单元格内打开新页面。

Use an <iframe> and change its src attribute with JavaScript not innerHTML. 使用<iframe>并使用JavaScript而不是innerHTML更改其src属性。

Check these links: 检查以下链接:
http://www.w3schools.com/html/html_iframe.asp http://www.w3schools.com/html/html_iframe.asp
http://www.w3schools.com/tags/tag_iframe.asp http://www.w3schools.com/tags/tag_iframe.asp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM