Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在我的例子中,如何将链接页面显示为表元素的内容?_Javascript_Jquery_Html_Javascript Events - Fatal编程技术网

Javascript 在我的例子中,如何将链接页面显示为表元素的内容?

Javascript 在我的例子中,如何将链接页面显示为表元素的内容?,javascript,jquery,html,javascript-events,Javascript,Jquery,Html,Javascript Events,我已经做了一个HTML表格 假设我有一个链接,例如,指向www.nokia.com的链接,我可以在单击“单击我”时将链接页面显示为表格元素的内容吗?如何做到这一点 <a href="#">click me</a> <table> <tr> <td> // how to show the content of "www.nokia.com" page here </td> </

我已经做了一个HTML表格

假设我有一个链接,例如,指向www.nokia.com的链接,我可以在单击“单击我”时将链接页面显示为表格元素的内容吗?如何做到这一点

<a href="#">click me</a>

<table>
  <tr>
    <td>
         // how to show the content of "www.nokia.com" page here
    </td>
  </tr>  
<table>
也许你可以使用jQuery来完成这项工作

例如:

jQuery:

$(document).ready(function(){
  $("a").click(function(){
      $("iframe").show();
  });
});
HTML:

<a href="#">click me</a>

<table>
  <tr>
    <td>
      <iframe src="http://www.nokia.com" width="100%" height="300"  style="display: none;">
      <p>Your browser does not support iframes.</p>
      </iframe>        
    </td>
  </tr>  
<table>