2015-02-12 19 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; 
}