2017-08-14 36 views
-1

我發現這個代碼模板,我想用於通訊註冊形式。我無法弄清楚這個代碼中的訂閱按鈕的鏈接。我不想創建一個新的按鈕。我曾嘗試使用行爲代碼以及href。將訂閱按鈕的代碼鏈接放在哪裏?

<div class="span4"> 
 
    <div class="p30"> 
 
     
 
     <h3>Newsletter</h3> 
 
     <form class="soundest-subscribe" style="width: 100%;"> 
 
       <input type="text" class="soundest-subscribe-input" placeholder="Enter your email address" style="width: 100%; height: 34px; display: block; color: #a0a0a0; font-size: 14px; font-family: Times New Roman, ; padding: 6px; border: 1px solid #cfcfcf; outline-width: 0px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;" /> 
 
    
 
    <input type="submit" value="SUBSCRIBE" style="width : 100%; height: 34px; display: block; color: #ffffff; font-size: 14px; font-weight: ; font-family: Verdana, sans-serif; padding: 8px; margin-top: 5px; background-color: #a2a2a2; border-width: 0px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; outline-width: 0px; cursor: pointer;" /> 
 
     </form> 
 
    </div> 
 
</div>

+0

您可以通過將'action'屬性值賦給'form'元素來設置它。 '

'。 爲了執行邏輯,您至少需要一個服務器端代碼來處理邏輯。 –

+0

謝謝!完美的作品。 – Shetheheart

回答

0
<div class="span4"> 
    <div class="p30"> 

    <h3>Newsletter</h3> 
    <form class="soundest-subscribe" style="width: 100%;"> 
     <input type="text" class="soundest-subscribe-input" placeholder="Enter your email address" style="width: 100%; height: 34px; display: block; color: #a0a0a0; font-size: 14px; font-family: Times New Roman, ; padding: 6px; border: 1px solid #cfcfcf; outline-width: 0px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;" /> 

     <input type="submit" value="SUBSCRIBE" style="width : 100%; height: 34px; display: block; color: #ffffff; font-size: 14px; font-weight: ; font-family: Verdana, sans-serif; padding: 8px; margin-top: 5px; background-color: #a2a2a2; border-width: 0px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; outline-width: 0px; cursor: pointer;" /> 
    </form> 
    </div> 

請遵守你的表單操作,點擊該按鈕,用戶將被導航到www.google.com。您可以用自己的形式替換表單操作中提到的網址。

+0

謝謝!爲我工作! – Shetheheart