简体   繁体   中英

How to render a html partial in another html page?

I need to render a simple HTML page as partial within this div.It is a simple HTML5 application, not of MVC architecture hence Html.RenderPartial is not working.Any help??

<div id= "this_div_will_contain_partial">
</div>

Use jquery's load:

<script>
    $(function(){
        $('#this_div_will_contain_partial').load('http://www.urpartialurl.com');
    });
</script>

I have noticed that you haven't included javascript tag but this is the only option to achieve this. Also the page you are trying to access needs to be on the same domain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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