2015-02-12 57 views
0

我覺得像這樣的東西,但我不想用一個按鈕來提交,我會通過點擊春天的消息提交。這可能以某種方式嗎?點擊<spring:message>可以提交一個隱藏的輸入。

<spring:url value="/admin/messages" var="messagesUrl" htmlEscape="true"/> 
    <form action="${messagesUrl}" method="POST" class="new-message"> 
     <input type="hidden" name="messageFromDashboard" value="true"> 
     <spring:message code="${newMessage}"> 
     <input type="submit" value="submit"></spring:message> 
    </form> 

回答

1

也許this將會有所幫助。爲什麼你不想使用提交按鈕?如果你只是想看看它像一個標籤/鏈接只是使用CSS類似於http://jsfiddle.net/adardesign/5vHGc/

HTML:

<button> your button that looks like a link</button> 

的CSS:

button { 
    background:none!important; 
    border:none; 
    padding:0!important; 

    /*optional*/ 
    font-family:arial,sans-serif; /*input has OS specific font-family*/ 
    color:#069; 
    text-decoration:underline; 
    cursor:pointer; 
} 
相關問題