【问题标题】:What is the use of label tag in springspring中label标签有什么用
【发布时间】:2017-09-19 10:38:21
【问题描述】:

这是我在 Spring 应用程序中使用的 jsp 代码。

<form:label path="username">Enter your user-name</form:label>
            <form:input id="username" name="uName" path="" /><br>
            <form:label path="username">Please enter your password</form:label>
            <form:password id="password" name="password" path="" /><br>
            <input type="submit" value="Submit" />

谁能解释一下标签路径属性的用途。它是做什么的。因为当我更改此路径值时,它会在显示时向我抛出错误。有人能解释一下它是什么吗?

【问题讨论】:

标签: java spring jsp spring-mvc label


【解决方案1】:

Path标签用于绑定数据。

鉴于标签不是输入,您可以使用带有“for”属性的标签,例如:

<label for="inputField"><spring:message code="label.input"/></label>

【讨论】:

    猜你喜欢
    • 2013-08-28
    • 2023-03-09
    • 2021-08-07
    • 2016-06-15
    • 1970-01-01
    • 2022-10-18
    • 1970-01-01
    • 2010-10-04
    • 2012-09-13
    相关资源
    最近更新 更多