Forms 如何将表单字段显示为超链接?

Forms 如何将表单字段显示为超链接?,forms,hyperlink,Forms,Hyperlink,我正在使用表单显示数据库中的值,编辑它并再次提交到数据库 表格中的表格及其tr <tr> <td><label for="userwebsite">Website</label></td> <td> <div class="input-field-pair-edit-user"> <form:input path="userWebsite" id="userWebsite" /> &

我正在使用表单显示数据库中的值,编辑它并再次提交到数据库

表格中的表格及其tr

<tr>
 <td><label for="userwebsite">Website</label></td>
 <td>
  <div class="input-field-pair-edit-user">
   <form:input path="userWebsite" id="userWebsite" />
  </div>
 </td>
</tr>

我需要的是,当显示时,我想将我在userWebsite url中获得的值显示为超链接。

对于制作指向您网站的超链接

<tr>
 <td><label for="userwebsite"><a href="http://www.mywebsite.com" target="">Website</a></label></td>
 <td>
  <div class="input-field-pair-edit-user">
   <form:input path="userWebsite" id="userWebsite" />
  </div>
 </td>
</tr>

使用锚标签像我的网站在你的网站,然后它的作品很好

下面是从表中打开google的示例代码

<tr>
 <td><label for="userwebsite">Website</label></td>
 <td>
   <a href="http://www.google.com">Google</a>
  <div class="input-field-pair-edit-user">
   <form:input path="userWebsite" id="userWebsite" />
  </div>
 </td>

试试这个。。。。target=>website我需要显示为超链接的是我在userwebsite中得到的值。你能写你的代码吗,是的,我认为userwebsite链接写在锚定标记中。只需将你的userwebsite变量放在锚定标记hre属性中。类似:网站名称由代码path=userWebsite显示,其中userWebsite是保存用户详细信息的表的模型类中特定字段的名称。所以我需要一种方法来编辑路径和包含超链接。你能写你的路径=用户网站代码吗?你从哪里获得网站链接?
<tr>
 <td><label for="userwebsite">Website</label></td>
 <td>
   <a href="http://www.google.com">Google</a>
  <div class="input-field-pair-edit-user">
   <form:input path="userWebsite" id="userWebsite" />
  </div>
 </td>