如何在另一个html页面内使用html页面 [英] how to use html page inside another html page

查看:109
本文介绍了如何在另一个html页面内使用html页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在另一个html页面中显示一个html页面。当我向iframe提供src然后源无法找到时,我想在iframe标签中显示内部。我的代码如下:



$(#table11)。find('tbody')。append($('')。append($('< lt ; iframe>')。attr('src','〜/ iConsent / home.html'));



但是当我运行项目并检查源代码然后我查找源是:http:// localhost:5059 /〜/ iConsent / home.html但我想只获取〜/ iConsent / home.html路径如何删除剩余的(http:// localhost:5059)部分。我将〜/ iConsent / home.html代码传递给jquery代码。请帮助

解决方案
( #表11)。找到( 'TBODY')。追加(

( '')。追加(

('< iframe>')。attr('src','〜/ iConsent / home.html'));



但是当我运行项目并检查时源码然后我发现源是:http:// localhost:5059 /〜/ iConsent / home.html但我想只获取〜/ iConsent / home.html路径如何删除剩余(http:// localhost:5059部分。我通过〜/ iConsent / home.htm l代码到jquery代码后面。请帮助


i want to display a html page inside a another html page. i want to display inside in iframe tag when provide src to iframe then source can not find. my code is below:

$("#table11").find('tbody').append($('').append($('<iframe>').attr('src','~/iConsent/home.html'));

but when i run project and check source then i find source is: http://localhost:5059/~/iConsent/home.html but i want to get only ~/iConsent/home.html path how to remove remaining("http://localhost:5059") part. i pass ~/iConsent/home.html code behind to jquery code. please help

解决方案

("#table11").find('tbody').append(


('').append(


('<iframe>').attr('src','~/iConsent/home.html'));

but when i run project and check source then i find source is: http://localhost:5059/~/iConsent/home.html but i want to get only ~/iConsent/home.html path how to remove remaining("http://localhost:5059") part. i pass ~/iConsent/home.html code behind to jquery code. please help


这篇关于如何在另一个html页面内使用html页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆