2015-07-20 46 views
0

我想知道是否可以創建一個表單,可以將設置了mailto操作的電子郵件更改爲在文本字段中輸入的內容。將郵件的收件人更改爲在文本字段中輸入的內容

例如:

<form enctype="text/plain" method="get" action="mailto:getElementByName='friend1'" action="cc:[email protected]"> 
Friend 1 <input type="text" name="friend1"><br> 
Friend 2 <input type="text" name="friend2"><br> 
Friend 3 <input type="text" name="friend3"><br> 

<input type="submit" value="Send"> 
</form> 

因此,如果在一個名爲「朋友1」我將進入第一場:「[email protected]」,然後當我按下提交我想它取信息是被放置到第一個領域,並使其成爲mailto。

我爲我的英語表示歉意,希望能讀懂這篇文章的人瞭解它。 預先感謝您。這裏

<form method="post" action="javascript:;" onSubmit="this.action='mailto:'+document.getElementById('friend1').value;" enctype...> 

檢查過:

+0

退房http://stackoverflow.com/a/15218012/786096 –

+0

重複:HTTP://計算器。 com/questions/6867613/is-it-it-to-dynamic-set-the-recipient-of-only-only-html-and-ja – MiiinimalLogic

+0

謝謝各位! :) –

回答

相關問題