修改JAVASCRIPT

function selected(){
    

 if (document.forms[0].myRadio.length > 1)
 {
  var selectValue = -1;
  for (i = 0; i < document.forms[0].myRadio.length; i++) {
   if (document.forms[0].myRadio[i].checked) {
       document.forms[0].btn_change.disabled=false;
       document.forms[0].btn_delete.disabled=false;
    selectValue = document.forms[0].myRadio[i].value;
    break;
   }     
  }
 
   document.forms[0].txt_studentClass1.value = document.forms[0].classNo[selectValue].value;
                                    

  document.forms[0].txt_studentName.value = document.forms[0].stuName[selectValue].value;
   document.forms[0].txt_studentIdCard.value = document.forms[0].idCardNo[selectValue].value;
   document.forms[0].txt_studentCollage.value = document.forms[0].collage[selectValue].value;
   document.forms[0].txt_studentSpecialized.value = document.forms[0].specialized[selectValue].value;
   document.forms[0].txt_studentProTest.value = document.forms[0].score[selectValue].value;
   document.forms[0].txt_studentAdd.value = document.forms[0].address[selectValue].value;
   document.forms[0].txt_studentTel.value = document.forms[0].phone[selectValue].value;
   document.forms[0].txt_studentArrange.value = document.forms[0].isArrange[selectValue].value;
   document.forms[0].txt_studentBirth.value = document.forms[0].birthday[selectValue].value;
   document.forms[0].txt_studentSex.value = document.forms[0].sex[selectValue].value;
  }else{
   document.forms[0].btn_change.disabled=false;
   document.forms[0].btn_delete.disabled=false;
   document.forms[0].txt_studentClass1.value = document.forms[0].classNo.value;
   document.forms[0].txt_studentName.value = document.forms[0].stuName.value;
   document.forms[0].txt_studentIdCard.value = document.forms[0].idCardNo.value;
   document.forms[0].txt_studentCollage.value = document.forms[0].collage.value;
   document.forms[0].txt_studentSpecialized.value = document.forms[0].specialized.value;
   document.forms[0].txt_studentProTest.value = document.forms[0].score.value;
   document.forms[0].txt_studentAdd.value = document.forms[0].address.value;
   document.forms[0].txt_studentTel.value = document.forms[0].phone.value;
   document.forms[0].txt_studentArrange.value = document.forms[0].isArrange.value;
   document.forms[0].txt_studentBirth.value = document.forms[0].birthday.value;
   document.forms[0].txt_studentSex.value = document.forms[0].sex.value;
  }
}
        function Change(){
        alert("change start");
        var stuName = document.forms[0].txt_studentName.value;
        alert("stuName=" + stuName);
  var studentIdCard = document.forms[0].txt_studentIdCard.value;
  alert("studentIdCard=" + studentIdCard);
  var studentCollage = document.forms[0].txt_studentCollage.value;
  alert("studentCollage=" + studentCollage);
  var studentSpecialized = document.forms[0].txt_studentSpecialized.value;
  alert("studentSpecialized=" + studentSpecialized);
  var studentProTest = document.forms[0].txt_studentProTest.value;
  alert("studentProTest=" + studentProTest);
  var studentAdd = document.forms[0].txt_studentAdd.value;
  alert("studentAdd=" + studentAdd);
  var studentTel = document.forms[0].txt_studentTel.value;
  alert("studentTel=" + studentTel);
  var classId = document.forms[0].txt_studentClass1.value;
  alert("classId=" + classId);
        var studentArrange = document.forms[0].txt_studentArrange.value;
        alert("studentArrange=" + studentArrange);
        var studentBirth = document.forms[0].txt_studentBirth.value;
        alert("studentBirth=" + studentBirth);
        var studentSex = document.forms[0].txt_studentSex.value;
        alert("studentSex=" + studentSex);
        var url="/admit/hanlei/studentChange.jsp?txt_studentName=" + stuName
    + "&txt_studentIdCard=" + studentIdCard
    + "&txt_studentCollage=" + studentCollage
    + "&txt_studentSpecialized=" + studentSpecialized
    + "&txt_studentProTest=" + studentProTest
    + "&txt_studentAdd=" + studentAdd
    + "&txt_studentTel=" + studentTel
    + "&txt_studentClass1=" + classId
    + "&txt_studentArrange=" + studentArrange
    + "&txt_studentBirth=" + studentBirth
    + "&txt_studentSex=" + studentSex
    + "&txt_system=妛?怣懅廋夵"
    + "&returnID=studentSearchInitAction.do";
  alert(url);  
  location.href=url;
       }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值