隐藏的表单字段?(Hidden Form Field?)

其他开发 IT屋
百度翻译此文   有道翻译此文
问 题

<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屋 » Hidden Form Field?

问 题

< 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>



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


解决方案

好的,只要让它隐藏然后

 < input type =“hidden”name =“用户名”只读值=“'。$ user->用户名。'“> 


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

本文地址:IT屋 » 隐藏的表单字段?

官方微信
扫一扫关注IT屋
微信公众号搜索 “ IT屋 ” ,选择关注
与百万开发者在一起