It’s as follows :
@coins = ("Quarter","Dime","Nickel");
push(@coins, "Penny");
O/p
@coins = Quarter Dime Nickel Penny
It’s as follows :
@coins = ("Quarter","Dime","Nickel");
push(@coins, "Penny");
O/p
@coins = Quarter Dime Nickel Penny
It’s as follows :
function
listbox_selectall(listID, isSelect) {
var
listbox = document.getElementById(listID);
for
(
var
count=0; count < listbox.options.length; count++) {
listbox.options[count].selected = isSelect;
}
}
onclick="listbox_selectall(
'countryList'
,
true
)"
//select all the options
(or)
onclick="listbox_selectall(
'countryList'
,
false
)"
//deselect all the options
It’s as follows :
var src = document.getElementById('leftSelect');
var selected = [];
var options = src.options.length;
for (var i=0; i < options ; i++)
{
if(src.options[i].selected)
{
alert(src.options[i].text);
alert(src.options[i].value);
}
}
<html> <select id="leftSelect" onclick="" name="edu_quli" size="10" multiple="multiple"> <option value="10th">10th</option> <option value="+2">+2</option>
<option value="Any Graduation">Any Graduation</option> <option value="Any Post Graduation">Any Post Graduation</option> <option value="Arts Post-Graduation">Arts Post-Graduation</option><option value="Science Post-Graduation">Science Post-Graduation</option> <option value="Commerce Post-Graduation">Commerce Post-Graduation</option> <option value="Technical/Professional Post-Graduation">Technical/Professional Post-Graduation</option> <option value="Management Post-Graduation">Management Post-Graduation</option> <option value="Other Post-Graduation">Other Post-Graduation</option> <option value="Diploma">Diploma</option> <option value="Others">Others</option> </select></html>
It’s as follows :
#!/uer/bin/perl @array = (1,2,3); $array[50] = 4; $size = @array; $max_index = $#array; print "Size: $size\n"; print "Max Index: $max_index\n";
O/P
Size: 51 Max Index: 50
It can be done as follows :
document.forms["Form_Name"].submit();
You must be logged in to post a comment.