Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to delete an entry using JavaScript?
How to delete an entry using JavaScript?
✍: Guest
The "delete" operator removes an array element, but oddly does not change the size of the array.
<script type="text/javascript">
var days = ["Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday"];
document.write("Number of days:"+days.length);
delete days[4];
document.write("<br />Number of days:"+days.length);
</script>
This produces
Number of days:7
Number of days:7
2011-07-19, 4140👍, 0💬
Popular Posts:
What is difference between ADPATCH and OPATCH ? # ADPATCH is utility to apply ORACLE application Pat...
How To Create Nested Tables? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells You can cr...
Can each Java object keep track of all the threads that want to exclusively access to it?
How can I execute a PHP script using command line? Just run the PHP CLI (Command Line Interface) pro...
How Do You Uninstall JUnit Uninstalling JUnit is easy. Just remember these: Delete the directory tha...