在iframe(XSL)中自动打开URL

时间:2013-08-07 12:45:36

标签: html xslt iframe

我正在使用XSL根据Excel工作表中的值为不同的变量创建特定的URL。我有一切工作,我现在必须点击创建的链接来打开iframe中的URL。我希望我可以在没有点击的情况下完成此操作,以便在打开页面时加载链接。以下是相关的代码:

<xsl:when test="FieldName[starts-with(., 'UniqueID')]">
 <b>
  <a target="IFRAME">
   <xsl:attribute name="href">
    file:///C:/Users/me/documents/<xsl:value-of select="FieldValue"/>.html
   </xsl:attribute>
  <xsl:value-of select="FieldValue"/>
  </a>
 </b>
</xsl:when>

1 个答案:

答案 0 :(得分:0)

您可以直接创建iframe:

<xsl:when test="FieldName[starts-with(., 'UniqueID')]">
  <iframe>
    <xsl:attribute name="src">
      file:///C:/Users/me/documents/<xsl:value-of select="FieldValue"/>.html
    </xsl:attribute>
  </iframe>
</xsl:when>
相关问题