一键删除文本字段中的整个文本
我有以下代码,它是我为 iPhone/android 手机构建的应用程序的一部分。
<li><span>X</span><input type="text" pattern="[0-9]*" id="anum" maxlength="9" placeholder="Account Number""/></li>
<li><span>X</span><input type="text" id="bname" placeholder="Beneficiary Name" /></li>
当按下键盘上的按钮时,跨度之间的“X”应该出现。出现“x”后,用户可以通过按“x”删除该字段中的整个文本。当字段中根本没有元素时,“x”不可见。但我不能让它发生。
我正在使用 webapp-net。如果有人能帮助我解决这个问题,我会很高兴。
I have the following codes, its part of the application I am building for iPhone/android phones.
<li><span>X</span><input type="text" pattern="[0-9]*" id="anum" maxlength="9" placeholder="Account Number""/></li>
<li><span>X</span><input type="text" id="bname" placeholder="Beneficiary Name" /></li>
the "X" between the spans is suppose to appear when on a keyboard a button is pressed. after the "x" has appeared the user can remove the entire text in that field by pressing on the "x". when there is no element in the field at all, the "x" is not visible. But i cant make it happen.
I am using webapp-net. I would be glad if some could help me with this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 WebApp.Net 也不太熟悉,但您可能会考虑使用表单和重置按钮,例如:
或类似的内容:
在
如果我没有理解错的话,您还可以考虑查看该框架上是否有诸如文本区域和/或文本输入的占位符之类的东西。祝你好运。
I'm not either quite familiar with WebApp.Net, but you might consider on using a form and a reset button, such as:
or something like:
inside of a
<form>
with the rest text inputs, and having in mind an html-like enviroment (even thought this might not clear a radio/checkbox inputs).If I haven't got you wrong, you might also consider on looking if there is something like placeholders for textareas and/or text inputs on that framework. Good luck.