javascript Html µ¼³öΪword excel
<HTML>
<HEAD>
<title>WEBÒ³Ãæµ¼³öΪEXCELÎĵµµÄ·½·¨
</title>
</HEAD>
<body>
<BR>
<table id = "PrintA" width="100%" border="1" cellspacing="0" cellpadding="0" bgcolor = "#61FF13">
<TR style="text-align : center;" mce_style="text-align : center;">
<TD>µ¥Ôª¸ñA</TD>
<TD>µ¥Ôª¸ñA</TD>
<TD>µ¥Ôª¸ñA</TD>
<TD>µ¥Ôª¸ñA</TD>
</TR>
<TR>
<TD colSpan=4 style="text-align : center;" mce_style="text-align : center;"><font color="BLUE" face="Verdana">µ¥Ôª¸ñºÏ²¢ÐÐA</FONT></TD>
</TR>
</TABLE>
<BR>
<table id = "PrintB" width="100%" border="1" cellspacing="0" cellpadding="0">
<TR style="text-align : center;" mce_style="text-align : center;">
<TD>µ¥Ôª¸ñB</TD>
<TD>µ¥Ôª¸ñB</TD>
<TD>µ¥Ôª¸ñB</TD>
<TD>µ¥Ôª¸ñB</TD>
</TR>
<TR>
<TD colSpan=4 style="text-align : center;" mce_style="text-align : center;">µ¥Ôª¸ñºÏ²¢ÐÐB</TD>
</TR>
</TABLE>
<br><br><br>
<input type="button" onclick="javascript:AllAreaWord();" value="µ¼³öÒ³ÃæÖ¸¶¨ÇøÓòÄÚÈݵ½Word">
<input type="button" onclick="javascript:AllAreaExcel();" value="µ¼³öÒ³ÃæÖ¸¶¨ÇøÓòÄÚÈݵ½Excel">
<input type="button" onclick="javascript:CellAreaExcel();" value="µ¼³ö±íµ¥µ¥Ôª¸ñÄÚÈݵ½Excel">
<SCRIPT LANGUAGE="javascript">
//Ö¸¶¨Ò³ÃæÇøÓòÄÚÈݵ¼ÈëExcel
function AllAreaExcel()
{
var oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
var sel=document.body.createTextRange();
sel.moveToElementText(PrintA);
sel.select();
sel.execCommand("Copy");
oSheet.Paste();
oXL.Visible = true;
}
//Ö¸¶¨Ò³ÃæÇøÓò“µ¥Ôª¸ñ”ÄÚÈݵ¼ÈëExcel
function CellAreaExcel()
{
var oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Work
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
$wnd and $doc Calling native JavaScript with JSNI
$wnd ÊÇʲô£¿
GWT provides the $wnd and $doc variables to refer to the window and document objects
GWTʹÓÃͨ¹ýJava Native methodʹÓÃËü£¬ÉùÃ÷Ò»¸önative·½·¨£¬½«º¬ÓÐJavaScriptµÄ·½·¨Ìå×¢ÊÍ¡£±àÒëÆ÷½«×¢ÊÍ¿éÄÚµÄÄÚÈÝÖð×ÖÊä³ö£¬Ê¹Ö®Óë±àÒë²úÉúµÄJavaScriptÕûº ......
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ£º [u4e00-u9fa5]
¡¡¡¡ÆÀ×¢£ºÆ¥ÅäÖÐÎÄ»¹ÕæÊǸöÍ·ÌÛµÄÊ£¬ÓÐÁËÕâ¸ö±í´ïʽ¾ÍºÃ°ìÁË
¡¡¡¡Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)£º[^x00-xff]
¡¡¡¡ÆÀ×¢£º¿ÉÒÔÓÃÀ´¼ÆËã×Ö·û´®µÄ³¤¶È£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
¡¡¡¡Æ¥Åä¿Õ°×ÐеÄÕýÔò±í´ïʽ£ºns* ......
ÔÎĵØÖ·£ºhttp://aspalliance.com/1092_Rich_Text_Editor_Part_I
[ÔÎÄÔ´ÂëÏÂÔØ]
¿ª·¢Ò»¸ö×Ô¼ºµÄHTMLÔÚÏß±à¼Æ÷£¨Ò»£©
ÕªÒª
ÔÚ±¾ÎÄÖУ¬Haissam Abdul Malak½«¸ø´ó¼ÒÏêϸ½éÉÜÈçºÎʹÓÃjavascript¿ª·¢Ò»¸öHTMLÔÚÏß±à¼Æ÷£¬Ëü¿ÉÒÔÓ¦ÓÃÓÚwebÓ¦ÓóÌÐòÖУ¬ÌرðÊÇÂÛ̳£¬ÉçÇøºÍ²©¿Í¡£Õâ¸ö±à¼Æ÷Ö§³Ö»ùÓÚXHTML´´½¨Îı¾µÄ¹¦ÄÜ¡£
......