起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1734|回复: 2

[处理中4] iframe 显示不出页面,是什么原因?

[复制链接]

265

主题

614

帖子

1171

积分

金牌会员

Rank: 6Rank: 6

积分
1171
QQ
发表于 2017-6-21 07:17:32 | 显示全部楼层 |阅读模式
我在 wex5 中应用了:iframe,但显示不出页面。代码为:
<?xml version="1.0" encoding="utf-8"?>
<div xmlns="http://www.w3.org/1999/xhtml" component="$UI/system/components/justep/window/window" design="device:m;" xid="window" class="window">  
  <div component="$UI/system/components/justep/model/model" xid="model" style="left:18px;top:83px;height:244px;">
  </div>  
  <div component="$UI/system/components/justep/panel/panel"
    class="x-panel x-full" xid="panel1">
      <div class="x-panel-top" xid="top1">
        <div component="$UI/system/components/justep/titleBar/titleBar" title="标题"
          class="x-titlebar">
          <div class="x-titlebar-left">
            <a component="$UI/system/components/justep/button/button"
              label="" class="btn btn-link btn-only-icon" icon="icon-chevron-left"
              onClick="{operation:'window.close'}" xid="backBtn">
              <i class="icon-chevron-left"/>  
              <span></span>
            </a>
          </div>  
          <div class="x-titlebar-title">标题</div>  
          <div class="x-titlebar-right reverse">
          </div>
        </div>
      </div>  
    <div class="x-panel-content" xid="content1"><iframe src="www.baidu.com" xid="iframe1"></iframe></div>
  </div>
</div>

组件图: aa1.png


显示结果:
aa2.png


265

主题

614

帖子

1171

积分

金牌会员

Rank: 6Rank: 6

积分
1171
QQ
 楼主| 发表于 2017-6-21 07:22:34 | 显示全部楼层
经追踪,发现: iframe 的 url 错了,把系统本身的 url 加进去了:
http://localhost:8080/x5/UI2/v_1382fc4b081f4b31a0287c9b1d619195l_zh_CNs_d_m/myapp/newapp/www.baidu.com 404 (Not Found)

又如何让 iframe 的url地址,只等于 www.baidu.com ,不包含系统本身的 url 呢?
回复 支持 反对

使用道具 举报

1

主题

6163

帖子

2095

积分

金牌会员

Rank: 6Rank: 6

积分
2095
QQ
发表于 2017-6-21 10:33:15 | 显示全部楼层
yczxqy 发表于 2017-6-21 07:22
经追踪,发现: iframe 的 url 错了,把系统本身的 url 加进去了:
http://localhost:8080/x5/UI2/v_1382fc ...

iframe 的url地址写的时候因该是需要带上前面的http或是https的吧  这样应该就不会出现你说的情况了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-17 17:44 , Processed in 0.058569 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表