Hi, a newbies familiar question ...
The problem is this:
I have a static HTML file and I want to import only part of this file to another page. How can i do this.
Code example:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Some title here</title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <div id="box-1"> <div class="block"> </div> </div> <div id="box-2"> <div class="block"> </div> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script src="script.js"></script> </body> </html>
Now I want to read this HTML file and import only this bit:
<div id="box-1"> <div class="block"> </div> </div>
Is there any way to do this?
Please help.
Even PHP, jQuery, Ajax or any other solution will also do. Please help me.
source share