<script language="javascript">
function sub()
{
form.action="处理1.asp"; 
form.submit();
form.action="处理2.asp"; 
form.submit();
}
</script>
<input type="button" name="Submit"  onClick="sub();" value="提交" >
可以同时提交到几个不同的页面上处理数据。

解决方案 »

  1.   

    另外还有很重要的一点是,   点击BUTTON的时候需要同时生成多张报表,并且要求不要显示出来,直接输出到打印机直接打印
    同时提交多一个FORM能实现这样的功能吗?
      

  2.   

    通过页面传递,就是做个中间页面打印你用什么做的。我用这个
    <OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=0>
    </OBJECT>
    <style>
    @media print {
     .aaa {display:none;}
    }
    </style>
    <script language="javascript">
    function printsetup(){
    // 打印页面设置
    wb.execwb(8,1);
    }
    function printpreview(){
    // 打印页面预览
    wb.execwb(7,1);
    }
    function printit()
    {
    if (confirm('确定打印吗?')) {
    wb.execwb(6,1)
    }
    }
    </script>
      

  3.   

    那里不行,我一直这样用。要用三个按纽调用这三个函数!不想打印的东西class设为aaa.
      

  4.   

    你可以和现在的方法相同,不过是在页面onload的时候调用函数,然后关闭窗口就可以了啊
      

  5.   


    //一下是取数据的类
    //Obj参数指定数据的来源(限定Table),默认第一行为字段名称行
    //GetTableData类提供MoveNext方法,参数是表的行向上或向下移动的位数,正数向下移动,负数向上.
    //GetFieldData方法获得指定的列名的数据
    //Sort_desc方法对指定的列按降序排列
    //Sort_asc方法对指定的列按升序排列
    //GetData方法返回字段值为特定值的数据数组,提供数据,可以在外部进行其他处理
    //Delete方法删除当前记录,数组减少一行
    //初始化,Obj:table的名字,Leftlen:左面多余数据长度,Rightlen:右面多余数据长度,
    function GetTableData(Obj,LeftLen,RightLen){
    var MyObj=document.all(Obj);
    var iRow=MyObj.rows.length;
    var iLen=MyObj.rows[0].cells.length;
    var i,j;TableData=new Array();
    for (i=0;i< iRow;i++){
    TableData[i]=new Array();
    for (j=0;j<iLen;j++){
    TableStr=MyObj.rows(i).cells(j).innerText;
    TableStr=TableStr.substring(LeftLen, TableStr.length-RightLen).Trim();
    TableStr=TableStr.replace(/ /gi,"").replace(/\r\n/ig,"");
    TableData[i][j]=TableStr;
    }
    }
     
     this.TableData=TableData; 
     this.cols=this.TableData[0].length;
     this.rows=this.TableData.length;
     this.rowindex=0;
    }
    function movenext(Step){
    if (this.rowindex>=this.rows){
    return
    }if (Step=="" || typeof(Step)=="undefined") {
    if (this.rowindex<this.rows-1)
    this.rowindex++;
    return;}
    else{
    if (this.rowindex + Step<=this.rows-1 && this.rowindex + Step>=0 ){
    this.rowindex=this.rowindex + Step;
    }
    else
    {
    if (this.rowindex + Step<0){
     this.rowindex= 0;
     return;
     }
    if (this.rowindex + Step>this.rows-1){
     this.rowindex= this.rows-1;
     return;
     }
    }
    }
    }
    function getfielddata(Field){
    var colindex=-1;
    var i=0;
    if (typeof(Field) == "number"){
    colindex=Field;
    }
    else
    {
    for (i=0;i<this.cols && this.rowindex<this.rows ;i++){
    if (this.TableData[0][i]==Field){
    colindex=i;
    break;
    }
    }
    }
    if (colindex!=-1) {
    return this.TableData[this.rowindex][colindex];
    }}function sort_desc(){//降序
    var colindex=-1;
    var highindex=-1;
    desc_array=new Array();
    var i,j;
    for (n=0; n<arguments.length; n++){
    Field=arguments[arguments.length-1-n];
    for (i=0;i<this.cols;i++){
    if (this.TableData[0][i]==Field){
    colindex=i;
    break;
    }
    }
       if ( colindex==-1 )
    return;
       else
    {
    desc_array[0]=this.TableData[0];
    for(i=1;i<this.rows;i++){
    desc_array[i]=this.TableData[1];
    highindex=1;
    for(j=1;j<this.TableData.length;j++){
       if  (desc_array[i][colindex]<this.TableData[j][colindex]){
     desc_array[i]=this.TableData[j];   
     highindex=j;
    }

    }
    if (highindex!=-1)
    this.TableData=this.TableData.slice(0,highindex).concat(this.TableData.slice(highindex+1,this.TableData.length));                      
    }

    this.TableData=desc_array;
    }
    return;
    }function sort_asc(){//升序
    var colindex=-1;
    var highindex=-1;
    var i,j;
    for (n=0; n<arguments.length; n++){
    asc_array=new Array();
    Field=arguments[arguments.length-1-n];
    for (i=0;i<this.cols;i++){
    if (this.TableData[0][i]==Field){
    colindex=i;
    break;
    }
    }
    if ( colindex==-1 )
    return;
    else
    {
    asc_array[0]=this.TableData[0];
    for(i=1;i<this.rows;i++){
    asc_array[i]=this.TableData[1];
    highindex=1;
    for(j=1;j<this.TableData.length;j++){//找出最小的列值
       if  (asc_array[i][colindex]>this.TableData[j][colindex]){
     asc_array[i]=this.TableData[j];   
     highindex=j;

    }

    }
    if (highindex!=-1)
    this.TableData=this.TableData.slice(0,highindex).concat(this.TableData.slice(highindex+1,this.TableData.length));                      

    }

    this.TableData=asc_array;
    }
    return;
    }function getData(Field,FieldValue){
    var colindex=-1;
    var i,j;GetData=new Array();
    if (typeof(Field)=="undefined" || typeof(FieldValue)=="undefined" ){
    return this.TableData;
    }

    for(j=0;j<this.cols;j++){
       if  (this.TableData[0][j]==Field){
    colindex=j;
    }
    }
    if (colindex!=-1){

    for(i=1;i<this.rows;i++){
       if  (this.TableData[i][colindex]==FieldValue){
    GetData[i]=new Array();
    GetData[i]=this.TableData[i];
    }
    }
    }
       return GetData;
    }
    function DeletE(){
    this.TableData=this.TableData.slice(0,this.rowindex).concat(this.TableData.slice(this.rowindex+1,this.TableData.length));                      
    this.rows=this.TableData.length;
    return;
    }
    function updateField(Field,FieldValue){
    var colindex=-1;
    var i=0;
    if (typeof(Field) == "number"){
    colindex=Field;
    }
    else
    {
    for (i=0;i<this.cols && this.rowindex<this.rows ;i++){
    if (this.TableData[0][i]==Field){
    colindex=i;
    break;
    }
    }
    }
    if (colindex!=-1) {
    this.TableData[this.rowindex][colindex]=FieldValue;
    }
    }
    function movefirst(){
    this.rowindex=0;
    }
    function movelast(){
    this.rowindex=this.rows-1;
    }
    function String.prototype.Trim() {return this.replace(/(^\s*)|(\s*$)/g,"");}
    GetTableData.prototype.MoveNext = movenext;
    GetTableData.prototype.GetFieldData = getfielddata;
    GetTableData.prototype.Sort_asc = sort_asc;
    GetTableData.prototype.Sort_desc = sort_desc;
    GetTableData.prototype.GetData = getData;
    GetTableData.prototype.Delete = DeletE;
    GetTableData.prototype.UpdateField = updateField;
    GetTableData.prototype.MoveFirst = movefirst;具体的例子:http://202.119.73.208/NetEAn/com/test/jsprint.htm