(
cesta k stranke je localhost /userRpm/MacCloneCfgRpm.htm
tlacidlo ktore odosiela poziadavku na script je "RestoreMAC"
policko pre mac je "mac1"
script je doRestore(1);
Kód: Vybrať všetko
<!--//var i=0;function doRestore(nIndex){if(nIndex > macCloneInf[0]){return false;}else{document.forms[0].elements['mac'+nIndex].value = macCloneList[(nIndex - 1)*2 + 1];return true;}}function doClone(){var n = document.forms[0].wan.value;document.forms[0].elements['mac'+n].value = document.forms[0].pcmac.value;}function doSubmit(){if(!confirm(str_pages.ntw_mac_clone_cfg.js_reboot_prompt)){return false;}for(i = 1; i <= macCloneInf[0]; i++){if(!is_macaddr(document.forms[0].elements['mac'+i].value)){var element =document.forms[0].elements['mac'+i];if(element){element.focus();element.select();}return false;}}return true;}function is_spmac(mac_string){if(mac_string == "00-00-00-00-00-00"){alert(str_pages.ntw_mac_clone_cfg.js_bad_mac);return false;}var ch = "Ff-";for (var i = 0; i < mac_string.length; i++){c = mac_string.charAt(i);if(ch.indexOf(c) == -1)return true;}alert(str_pages.ntw_mac_clone_cfg.js_bad_mac);return false;}//-->