1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

求助一个JS的传递值的问题~!!

本帖由 斯文书生2007-04-04 发布。版面名称:前端开发

  1. 斯文书生

    斯文书生 New Member

    注册:
    2006-09-28
    帖子:
    5
    赞:
    0
    function GetClassPurview()
    {
    document.form1.ClassInputer_Article.value="";
    document.form1.ClassChecker_Article.value="";
    document.form1.ClassMaster_Article.value="";
    if(document.form1.Purview_Article[2].checked==true){
    for(var i=0;i<frmArticle.document.myform.Purview_Add.length;i++){
    if (frmArticle.document.myform.Purview_Add.checked==true){
    if (document.form1.ClassInputer_Article.value=="")
    document.form1.ClassInputer_Article.value=frmArticle.document.myform.Purview_Add.value;
    else
    document.form1.ClassInputer_Article.value+=","+frmArticle.document.myform.Purview_Add.value;
    }
    }
    for(var i=0;i<frmArticle.document.myform.Purview_Check.length;i++){
    if (frmArticle.document.myform.Purview_Check.checked==true){
    if (document.form1.ClassChecker_Article.value=="")
    document.form1.ClassChecker_Article.value=frmArticle.document.myform.Purview_Check.value;
    else
    document.form1.ClassChecker_Article.value+=","+frmArticle.document.myform.Purview_Check.value;
    }
    }
    for(var i=0;i<frmArticle.document.myform.Purview_Manage.length;i++){
    if (frmArticle.document.myform.Purview_Manage.checked==true){
    if (document.form1.ClassMaster_Article.value=="")
    document.form1.ClassMaster_Article.value=frmArticle.document.myform.Purview_Manage.value;
    else
    document.form1.ClassMaster_Article.value+=","+frmArticle.document.myform.Purview_Manage.value;
    }
    }
    }
    document.form1.ClassInputer_Soft.value="";
    document.form1.ClassChecker_Soft.value="";
    document.form1.ClassMaster_Soft.value="";
    if(document.form1.Purview_Soft[2].checked==true){
    for(var i=0;i<frmSoft.document.myform.Purview_Add.length;i++){
    if (frmSoft.document.myform.Purview_Add.checked==true){
    if (document.form1.ClassInputer_Soft.value=="")
    document.form1.ClassInputer_Soft.value=frmSoft.document.myform.Purview_Add.value;
    else
    document.form1.ClassInputer_Soft.value+=","+frmSoft.document.myform.Purview_Add.value;
    }
    }
    for(var i=0;i<frmSoft.document.myform.Purview_Check.length;i++){
    if (frmSoft.document.myform.Purview_Check.checked==true){
    if (document.form1.ClassChecker_Soft.value=="")
    document.form1.ClassChecker_Soft.value=frmSoft.document.myform.Purview_Check.value;
    else
    document.form1.ClassChecker_Soft.value+=","+frmSoft.document.myform.Purview_Check.value;
    }
    }
    for(var i=0;i<frmSoft.document.myform.Purview_Manage.length;i++){
    if (frmSoft.document.myform.Purview_Manage.checked==true){
    if (document.form1.ClassMaster_Soft.value=="")
    document.form1.ClassMaster_Soft.value=frmSoft.document.myform.Purview_Manage.value;
    else
    document.form1.ClassMaster_Soft.value+=","+frmSoft.document.myform.Purview_Manage.value;
    }
    }
    }
    document.form1.ClassInputer_Photo.value="";
    document.form1.ClassChecker_Photo.value="";
    document.form1.ClassMaster_Photo.value="";
    if(document.form1.Purview_Photo[2].checked==true){
    for(var i=0;i<frmPhoto.document.myform.Purview_Add.length;i++){
    if (frmPhoto.document.myform.Purview_Add.checked==true){
    if (document.form1.ClassInputer_Photo.value=="")
    document.form1.ClassInputer_Photo.value=frmPhoto.document.myform.Purview_Add.value;
    else
    document.form1.ClassInputer_Photo.value+=","+frmPhoto.document.myform.Purview_Add.value;
    }
    }
    for(var i=0;i<frmPhoto.document.myform.Purview_Check.length;i++){
    if (frmPhoto.document.myform.Purview_Check.checked==true){
    if (document.form1.ClassChecker_Photo.value=="")
    document.form1.ClassChecker_Photo.value=frmPhoto.document.myform.Purview_Check.value;
    else
    document.form1.ClassChecker_Photo.value+=","+frmPhoto.document.myform.Purview_Check.value;
    }
    }
    for(var i=0;i<frmPhoto.document.myform.Purview_Manage.length;i++){
    if (frmPhoto.document.myform.Purview_Manage.checked==true){
    if (document.form1.ClassMaster_Photo.value=="")
    document.form1.ClassMaster_Photo.value=frmPhoto.document.myform.Purview_Manage.value;
    else
    document.form1.ClassMaster_Photo.value+=","+frmPhoto.document.myform.Purview_Manage.value;
    }
    }
    }
    }