Adsense
Popular Posts
- Code update from PHP 7.4 to PHP 8.1 - PhpSpreadsheet
- MySQL workbench -"Could not decrypt password cache"
- Code update from PHP 7.4 to PHP 8.1 - Worksheet/Iterator.php
- Rendering HTML tags inside textarea
- axios handle blob type data
- Unix Utils and wget in Windows
- increase mysql query speed
- Setup vi syntax for PHP
- EXCEL return to the next line in the same cell
- Get WAMP running on EC2
Tuesday, May 26, 2015
Difference between set empty and set null in jquery input value
I posted form data in Modal form using $('form#populate').serializeArray().
I manually set an input text box empty
$("input[name='StudentID']").val(' ');
But when I use PHP empty function, the post data from StudentID is not empty. I used Network in web developer tools in Firefox and see the post data is "+". (Although finally it will transfer to empty string)
Finally I set it as null
$("input[name='StudentID']").val(null);
The post.data is " " in web tools and make empty function judges correctly.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment