多di公用一個css 按鈕控制div 動態載入iframe 頁面

來源:互聯網
上載者:User

標籤:多di公用一個css 按鈕控制div 動態載入iframe 頁面

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title></title><meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"><meta name="vs_targetSchema"content="http://schemas.microsoft.com/intellisense/ie5"><script language="JavaScript" type="text/JavaScript">function showdiv(targetid,objN){ var target=document.getElementById(targetid); var clicktext=document.getElementById(objN) if (target.style.display=="block") { target.style.display="none";    clicktext.innerText="開啟";  } else { target.style.display="block"; clicktext.innerText=‘關閉‘;  }      iframe.src="http://www.baidu.com";}</script><style type="text/css">#b1,#b2,#b3{ cursor: hand; cursor:pointer;}#v1,#v2 ,#v3{width:100%;    height:300px }.none { display: none; }--></style> </head><body>  <input id="b1" onclick="document.all.v1.innerHTML=‘<iframe src=\‘http://www.sina.com\‘></iframe>‘;showdiv(‘v1‘,‘b1‘);"type=button value=online1><br>  <div id="v1" class="none"></div> <input id="b2" onclick="document.all.v2.innerHTML=‘<iframe src=\‘http://www.sina.com\‘></iframe>‘;showdiv(‘v2‘,‘b2‘);"type=button value=online2><br>  <div id="v2" class="none"></div>  <textarea> 代碼需要維護 src段不允許換行 空格 </textarea></body></html></body></html>


多di公用一個css 按鈕控制div 動態載入iframe 頁面

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.