【问题标题】:Possible to change width of table to 100% with jQuery when width is hard coded in table?当宽度在表格中硬编码时,可以使用 jQuery 将表格的宽度更改为 100%?
【发布时间】:2012-09-14 19:21:47
【问题描述】:

我正在开发一个通过 iFrame 构建某些内容的网站。框架内的内容位于一个应用了静态宽度的表格中。该表没有类或 ID。无论如何我可以用jQuery将宽度更改为100%吗?再说一次,我无法访问这张桌子,它正在被框起来。

这是有问题的表格:

<table cellspacing="0" cellpadding="0" border="0" width='800'>

它的框架是这样的:

<iframe src="URL TO CONTENT" width="900" height="1500" style="margin:10px 0 10px 10px;"></iframe>

无论如何我都想不出让它工作?有人知道如何将表格宽度更改为 100%?

【问题讨论】:

  • iframe src 是否与包含它的页面相同?
  • SRC 指向外部域。

标签: jquery iframe html-table width


【解决方案1】:

如果 iframe 位于外部域中,则无法访问 DOM。

【讨论】:

  • 我认为可能是这样。谢谢。
猜你喜欢
  • 1970-01-01
  • 2011-11-08
  • 1970-01-01
  • 2018-02-25
  • 2011-03-03
  • 1970-01-01
  • 2014-07-09
  • 2018-08-14
  • 1970-01-01
相关资源
最近更新 更多