JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Web Design 版  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 請問如何按一個按鈕就加入一個text表單??
freshia77





發文: 32
積分: 0
於 2005-09-21 11:11 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
如題,請問javascript如何可以做到按一個按鈕或連結就會多一個text表單...

謝謝各位幫忙^^


reply to postreply to post
作者 Re:請問如何按一個按鈕就加入一個text表單?? [Re:freshia77]
kebin_liu

雲端決策系統

版主

發文: 1861
積分: 11
於 2005-09-21 13:34 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<html>
<head>
<script language="javascript">
function add(){
  document.all.test.innerHTML+="<input type='Text' name='T'><br>";
}
</script>
</head>
<body>
<form>
<div id="test">
</div>
<input type="button" onclick="add()">
</form>
</body>
</html>


reply to postreply to post
作者 Re:請問如何按一個按鈕就加入一個text表單?? [Re:freshia77]
freshia77





發文: 32
積分: 0
於 2005-09-21 14:18 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不好意思,可不可以再請問一下,如果每個格子都要取不一樣的名字該怎麼做呢??

謝謝Cool


freshia77 edited on 2005-09-21 14:48
reply to postreply to post
作者 Re:請問如何按一個按鈕就加入一個text表單?? [Re:freshia77]
kevincml





發文: 61
積分: 0
於 2005-09-22 14:41 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Try this

function add(tName){
document.all.test.innerHTML+="<input type='Text' name='"+ tName +"'><br>";
}


reply to postreply to post
» JWorld@TW »  Web Design 版

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8