25 lines
583 B
JavaScript
25 lines
583 B
JavaScript
function getCheckedValuesByName(checkboxname) {
|
|
var e=document.getElementsByName(checkboxname);
|
|
var p="";
|
|
|
|
for (var j=0;j<e.length;j++) {
|
|
if (e[j].checked) p+=e[j].value+" ";
|
|
};
|
|
return p;
|
|
}
|
|
|
|
function getSelectedValueById(selectname,idx) {
|
|
if (idx == undefined) idx = 0;
|
|
var i=document.getElementById(selectname).selectedIndex;
|
|
return document.getElementById(selectname).options[i+idx].value;
|
|
}
|
|
|
|
function checkEnter(event) {
|
|
event=event || window.event;
|
|
getEvent=event.keyCode;
|
|
if (getEvent == "13") {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|