Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScriptÄܽ«Ò³ÃæÖеÄͼƬµ¼³öµ½excel


Javascript´úÂë
<script>    
var idTmr = "";    
function copy(tabid){    
var oControlRange = document.body.createControlRange();    
oControlRange.add(tabid,0);    
oControlRange.select();    
document.execCommand("Copy");    
}    
function toExcel(tabid){    
copy(tabid);    
try{    
var xls = new ActiveXObject( "Excel.Application" );    
}catch(e){    
alert( "ExcelûÓа²×°»òä¯ÀÀÆ÷ÉèÖò»ÕýÈ·.ÇëÆôÓÃËùÓÐActive¿Ø¼þºÍ²å¼þ");    
return false;    
}    
xls.visible = true;    
var xlBook = xls.Workbooks.Add;    
var xlsheet = xlBook.Worksheets(1);    
xlBook.Worksheets(1).Activate;    
for(var i=0;i<tabid.rows(0).cells.length;i++){    
xlsheet.Columns(i+1).ColumnWidth=15;    
}    
xlsheet.Paste;    
xls=null;    
idTmr = window.setInterval("Cleanup();",1);    
}    
function Cleanup() {    
window.clearInterval(idTmr);    
CollectGarbage();    
}    
</script>    
<input type="button" value="µ¼Èëexcel" onclick="toExcel(t1)"> <!--°ÑtableµÄID´«¹ýÈ¥¾ÍºÃÁË-->    
<table id="t1">
<tr>
<td><img src="ͼƬµÄ·¾¶/ͼƬµÄÃû×Ö.jpg" id="img"/> </td><td></td>
</tr>
<tr>
<td></td><td></td>
</tr>
  
</table>    
//ÔÚIEä¯ÀÀÆ÷À﹤¾ß-¡·internetÑ¡Ïî-¡·°


Ïà¹ØÎĵµ£º

¼òµ¥µÄJavascript Cookie²Ù×÷

<mce:script type="text/javascript"><!--

function SetCookie(name,value,expire) {
var exp = new Date();
exp.setTime(exp.getTime() + expire);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
} ......

asp.netÒ³ÃæÖж¯Ì¬µØÌí¼Ójavascript½Å±¾

×î½üµÄÏîÄ¿¿ª·¢ÖÐ Óöµ½Ò»Ð©ÐèÒª¸ù¾Ý¾ßÌåÇé¿ö¶¯Ì¬Ìí¼ÓjavaScript½Å±¾£¬È»ºóÖ´Ðнű¾ ÓÚÊÇÊÕ¼¯ÁËһϣº
1 ÔڿؼþµÄ°ó¶¨Ê¼þÖÐÌí¼Ó½Å±¾ È磺ÔÚgridview¿Ø¼þµÄrowdatabindʼþÖпÉÒÔʵÏÖ Ö¸ÕëµÄÑ¡ÖÐÐв»Í¬É«ÏÔʾ ¿ÉÌí¼Ó½Å±¾
  protected void gvEngineerRepairState_RowDataBound(object sender, GridViewRowEventArgs e ......

javascriptÖжÔÖÐÎĽøÐбàÂë½âÂëµÄ·½Ê½

ÖÐÎıàÂ룺
 function upload() {
  var form = document.getElementById('topic');
  if ($('uploadfile').value == "") {
   alert("ÇëÑ¡ÔñÎļþ£¡");
   return;
  } 
  $('uploadfile').value = escape($('uploadfile').value) ......

JavaScript³£ÓÃ

--------------------------------------------------------------------------------
<body>
<mce:script type="text/javascript"><!--
document.write("Èç¹ûÏÔʾÁËÕâ¶ÎÎÄ×Ö£¬ÄÇôÄúµÄä¯ÀÀÆ÷Ö§³Ö JavaScript£¡")
// --></mce:script>
<noscript>No JavaScript support!</noscript&g ......

Javascriptº¯ÊýÀàÐÍÅжÏÍêÃÀ½â¾ö·½°¸


Javascriptº¯ÊýÀàÐÍÅжÏÍêÃÀ½â¾ö·½°¸
ÔÚÅжϺ¯ÊýÀàÐÍʱ£¬ÎÒÃÇͨ³£Ê¹ÓÃtypeof·½·¨£¬Ò»°ãÇé¿öÏ£¬Ëü»áµÃµ½ÎÒÃÇËùÔ¤ÏëµÄЧ¹û¡£µ«ÊÇ£¬ÓÐһЩϸ½Ú²¢²»ÎªÎÒÃÇËùÊìÖª¡£John Resig ÔÚ·ÖÎöÁËÕâЩϸ½ÚÖ®ºó£¬ÎªÎÒÃÇÌṩÁËÒ»¸öÍêÃÀµÄ½â¾ö·½°¸£¬±¾ÎĽ«×÷Ïêϸ½éÉÜ£º
Ò»¡¢´«Í³·½·¨²»ÎªÈËËùÖªµÄϸ½Ú
ºÁÎÞÒÉÎÊ£¬ÔÚÅжϺ¯ÊýÀàÐÍʱ£¬ÎÒÃÇÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ