如何禁用 Struts 标签的自动完成功能(HTML:text) [英] How to disable autocomplete for Struts tags(HTML:text)

查看:30
本文介绍了如何禁用 Struts 标签的自动完成功能(HTML:text)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于普通的 HTML 输入标签,禁用自动完成很简单,如下所示:

For normal HTML input tag,disabling autocomplete is simple as given below:

<input type="email" name="email" autocomplete="off">

而它不适用于下面给出的 Struts 标签:

Whereas its does not work for Struts tags given below:

<html:text property="" styleId="Field" maxlength="4" size="4" tabindex="14" 
    onblur="check(this);" value="" />

如何禁用 Struts 标签的自动完成功能?

How to disable autocomplete for Struts tags?

推荐答案

自动完成属性不会通过标记传递到呈现的 HTML.

Autocomplete attribute is not passed through to the rendered HTML by the tag.

您可以通过编写自己的自定义标记来实现此目的,该标记扩展标记以接受自动完成属性并将其传递给呈现的标记.

You can do so by writing your own custom tag that extends the tag to accept the autocomplete attribute and pass it through to the rendered tag.

检查这些链接::

Struts 2 + 禁用表单自动完成

http://www.coderanch.com/t/54020/Struts/form-input-tags-turning-autocomplete

这篇关于如何禁用 Struts 标签的自动完成功能(HTML:text)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆