disabled不可输入的值无法传递到action层_HTML/Xhtml_网页制作

PHP中文网
Release: 2016-05-16 16:37:36
Original
1141 people have browsed it

如果想让表单不可输入的状态,我将表单设置为了:

代码如下:

style="cursor:not-allowed;" disabled
Copy after login


但是这样设置之后就发现,在后台的action怎么都没有办法获取到值。最后在网上搜了一下,说把disabled替换成readonly,替换完成后确实可以将值传递到后台,但是表单又可以获得焦点。获得焦点让人看的不舒服。但是项目紧,就先这样了把。

表单设置为disabled后,就无法将值传递到后台了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!