What should I do if there are still values ​​after display:none is hidden?

零下一度
Release: 2017-06-24 10:55:56
Original
2129 people have browsed it

I used to think that after display:none, its value would no longer exist. After display:none was hidden, if the form had a value, its value would still exist. (There is a problem with the project!!)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Document</title><script src="jquery-1.7.1.min.js?1.1.11"></script></head><body><div style="display:none;">
  <input type="text" value="11" name="ceshi" class="buytt" /></div><input type="button" value="提交" class="yang" /><script type="text/javascript">$(document).ready(function(){
  $(".yang").click(function(){var data = $(".buytt").val();
    alert(data);
    });
  });</script></body></html>
Copy after login

2.

##

The above is the detailed content of What should I do if there are still values ​​after display:none is hidden?. For more information, please follow other related articles on the PHP Chinese website!

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template