1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

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

Discussion in '前端开发' started by 斯文书生, Apr 4, 2007.

  1. 斯文书生

    斯文书生 New Member

    Joined:
    Sep 28, 2006
    Messages:
    5
    Likes Received:
    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;
    }
    }
    }
    }