I have made a HTML table.
Suppose I have a link, for example, link to www.nokia.com , can I show the linked page as a content of the table element when “click me” has clicked? and how to do that?
JavaScript
x
10
10
1
<a href="#">click me</a>
2
3
<table>
4
<tr>
5
<td>
6
// how to show the content of "www.nokia.com" page here
7
</td>
8
</tr>
9
<table>
10
Advertisement
Answer
Maybe you could use <iframe>
and some jQuery for the job.
Example:
jQuery:
JavaScript
1
6
1
$(document).ready(function(){
2
$("a").click(function(){
3
$("iframe").show();
4
});
5
});
6
HTML:
JavaScript
1
12
12
1
<a href="#">click me</a>
2
3
<table>
4
<tr>
5
<td>
6
<iframe src="http://www.nokia.com" width="100%" height="300" style="display: none;">
7
<p>Your browser does not support iframes.</p>
8
</iframe>
9
</td>
10
</tr>
11
<table>
12