作者appleboy46 (小惡魔)
看板Ajax
標題Re: [問題] 將指定內容顯示在 div !!
時間Wed Sep 16 22:25:05 2009
※ 引述《ppp168p (時光暫停)》之銘言:
: 大家好:
: 我目前的顯示版面如下 ,左邊是按鈕列,右邊是顯示的內容:
: 我顯示的地方是用 <div> </div> 所標記起來的區域
: 想要請問一下大家,怎樣子做出按下按鈕列之後就改變<div></div>
: 所括起來的部分 ..有什麼關鍵字可以搜尋嗎???
: ┌──┐┌─────────┐
: └──┘│ │
: ┌──┐│ │
: └──┘│ │
: │ │
: └─────────┘
jQuery 作法:
$("
#register").click(function(){
$('#message').html('您的 html 語法');
});
<input type="button" id="register" value="點我" />
<div id="message">hi, I'm appleboy</div>
--
AppleBoy Blog:
http://blog.wu-boy.com
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 115.43.9.56
1F:推 chenshin0719:document.getElementById('xxx').innerHTML = xxx; 09/17 05:35