// JavaScript Document
//<div id="Layer1" >Happy New Year ! ! !
//<input type=button name='button_export' title='导出到word'  onclick=OpenWord() value=下载到word></div>
//</div>

function OpenWord()
{
      Layer1.style.border=0
      ExcelSheet = new ActiveXObject('Word.Application');
      ExcelSheet.Application.Visible = true;
      var mydoc=ExcelSheet.Documents.Add('',0,1);
          myRange =mydoc.Range(0,1)
      var sel=Layer1.document.body.createTextRange()
          sel.select()
          Layer1.document.execCommand('Copy')
          sel.moveEnd('character')
          myRange.Paste();
          location.reload()
          ExcelSheet.ActiveWindow.ActivePane.View.Type=9
}
//



