以可读状态打开网页 [英] open a web page in readable state

查看:63
本文介绍了以可读状态打开网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我的项目中有一个网页,其中包含各种控件,例如文本框,复选框,gridveiw等.这些控件已与数据库绑定,我想以只读模式打开该页面.请告诉我如何以只读方式显示该网页状态,以便可以看到其内容但不能编辑任何内容.

谢谢

Hi,
I have a web page in my project which is having various contols like textbox, check box, gridveiw etc. which are binded with database i want to open that page in read only mode.please tell me how to show a web page in read only state so that one can see its content but could not edit any thing.

Thanks

推荐答案

嘿,

HTML有一些可用于使控件不可编辑的特性.您可以将它们设置为只读或禁用它们.
Hey,

HTML has a couple of sttributes available to make controls uneditable. You can eitther make them read-only, or disable them.
<input type="text" name="address" value="123th First Street" readonly="readonly" />


或禁用文本框:


Or to disable the textbox :

<input type="text" name="address" value="123th First Street" disabled="disabled" />



对我自己来说,我喜欢禁用控件而不是将它们设置为只读,因为在各种设备上,这种区别更加明显,但是当然这是您的选择.

祝你好运!



For myself, i like to disabled controls in stead of making them read-only because the difference is more obvious on various devices, but ofcourse this choise is yours.

Good luck!


这篇关于以可读状态打开网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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