日期:2014-05-16  浏览次数:20365 次

javascript提示缺少分號
<script language="javascript">
  function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal) 
  {
  re = new RegExp(':' + aspCheckBoxID + '$'); //generated control name starts with a colon
  for(i = 0; i < document.forms[0].elements.length; i++) 
  {
  elm = document.forms[0].elements[i];
  if (elm.type == 'checkbox') 
  {
  if (re.test(elm.name)) 
  {
  if (elm.disabled == false)
  {
  elm.checked = checkVal;
  }
  }
  }
  }
  }  
  function saveLoc(e)
  {
  var drop_BoxLoc = document.getElementById("drop_BoxLoc");
  var hidden_loc = document.getElementById("hidden_loc");
  hidden_loc.value = drop_BoxLoc.options[e.selectedIndex].value;
  }  
function saveRec(e)
  {
  var drop_BoxRec = document.getElementById("drop_BoxRec");
  var hidden_rec = document.getElementById("hidden_rec");
  hidden_rec.value = drop_BoxRec.options[e.selectedIndex].value;
  }
   
  function getDropDownList(e, site)
  {
MM00016.WebForm1.getDropDownList(e.options[e.selectedIndex].value, site, getDropDownList_callback);
  }
   
  function getDropDownList_callback(res)
  {
var values = res.value;
var optionVals = new Array();
var items = new Array();  
optionVals = values.split('|'); 
items = optionVals[0].split(',');  
clearOption("drop_BoxLoc");
insertOption("drop_BoxLoc", "--Loc--", "");
for (i=0; i < items.length; ++i) 
{
if (items[i].length > 0)
{
insertOption("drop_BoxLoc", items[i], items[i]);
}
}
 
items = optionVals[1].split('=');
clearOption("drop_BoxRec");
insertOption("drop_BoxRec", "--Name--", "");
  for (i=0; i < items.length; ++i)
  {
  if (items[i].length > 0)
  {
  var badgeName = new Array();
  badgeName = items[i].split(';');
insertOption("drop_BoxRec", badgeName[1], badgeName[0]);//items[0]);
}
}  
res = null;
  }
   
  function insertOption(dropDownList, itemText, itemValue)
  {
  var elSel = document.getElementById(dropDownList);
  var elOptNew = document.createElement('option');
  elOptNew.text = itemText;
  elOptNew.value = itemValue;
  elSel.add(elOptNew); // IE only
  }
   
  function clearOption(dropDownList)
  {
  document.getElementById(dropDownList).options.length = 0;
  }
</script>

----