function getParameter(qs) {
          var value = '';
          var address = unescape(location.href);
          var param= (address.slice(address .indexOf('?') + 1, address .length)).split('&');

          for (var i = 0; i < param.length; i++) {
              var name = param[i].split('=')[0];

              if (name.toUpperCase() == qs.toUpperCase()) {
                  value = param[i].split('=')[1];
                  break;
              }
          }
          return value ;
}

빨간 부분이 핵심~

by 피요히코~ 2009. 4. 6. 16:42
| 1 |