隐藏的表单字段? [英] Hidden Form Field?

查看:254
本文介绍了隐藏的表单字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< form action =/ action.php>

< input type = textboxname =Usernamereadonly value ='。$ user-> username。'>

< ; input type =checkboxname =check1value =selected>
< input type =submitvalue =submit>< / form>



我想隐藏来自用户的表单的文本框输入?该文本框自动收集我的网站登录用户的用户名,但我不想显示给他们..它看起来很尴尬。如何实现隐藏它?有没有出路?

解决方案

好的,只要让它隐藏然后

 < input type =hiddenname =用户名只读值='。$ user->用户名。'> 

尽管
仍然可以在源代码中看到它

<form action="/action.php">
<input type="textbox" name="Username" readonly value=" ' . $user->username . ' ">
<input type="checkbox" name="check1" value="selected"> <input type="submit" value="submit"></form>

I want to hide the textbox input of the form from the user? The text box automatically collects the username of the logged in user of my website but i don't want to show it to them..It looks awkward. How to achieve hide it? Is there a way out?

解决方案

Well, just make it hidden then

<input type="hidden" name="Username" readonly value=" ' . $user->username . ' "> 

They can still see it in the source code though

这篇关于隐藏的表单字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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