JavaScript·ÂExcel±í¸ñÑÝʾ
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0041)/ -->
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>JavaScript·ÂExcel±í¸ñÑÝʾ- /</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT type=text/JavaScript>
var toBeColor = "#F8F9FC";
var backColor = "#FFFFFF";
var tableId = "tbData";
var table;
var tbody;
var divShowInput;
window.onload=function(){
beginListen();
table = document.getElementById(tableId);
tbody = table.getElementsByTagName("tbody")[0];
actionFill ();
otherFill();
creatDiv();
divShowInput = document.getElementById("divShowInput");
}
function creatDiv(){
var filldiv = document.createElement("div");
filldiv.setAttribute("id","divShowInput");
var barp = document.createElement("p");
barp.setAttribute("id","barTitle");
barp.onclick=hideDiv;
var defComP = document.createElement("p");
defComP.setAttribute("id","defComP");
defComP.onclick=hideDiv;
var cleara = document.createElement("a");
/* / */
cleara.setAttribute("href","javascript:void 0");
cleara.onclick=clearInput;
var clearatext = document.createTextNode("Çå¿Õ");
cleara.appendChild(clearatext);
defComP.appendChild(cleara);
var autoP = document.createElement("P");
autoP.setAttribute("id","autoFillP");
filldiv.appendChild(barp);
filldiv.appendChild(defComP);
filldiv.appendChild(autoP);
document.body.appendChild(filldiv);
}
function actionFill (){
var dbinputs = tbody.getElementsByTagName("input");
for (var i = 1;i<=dbinputs.length-1;i++){
dbinputs[i].onfocus=stopListen;
dbinputs[i].onblur=beginListen;
dbinputs[i].ondblclick=showDiv;
dbinputs[i].onmouseover=onChangTrColor;
dbinputs[i].onmouseout=outChangTrColor;
dbinputs[i].onclick=readyedit;
dbinputs[i].onkeydown=gonext;
}
}
function otherFill (){
var Bt_selectAll = document.getElementById("Bt_selectAll")
Ïà¹ØÎĵµ£º
//ÅжÏÊäÈëÄÚÈÝÊÇ·ñΪ¿Õ
function IsNull(){
var str = document.getElementById('str').value.trim();
if(str.length==0){
alert('¶Ô²»Æð£¬Îı¾¿ò²»ÄÜΪ¿Õ»òÕßΪ¿Õ¸ñ!');//Ç뽫“Îı¾¿ò”¸Ä³ÉÄãÐèÒªÑéÖ¤µÄÊôÐÔÃû³Æ!
}
}
//ÅжÏÈÕÆÚÀàÐÍÊÇ·ñÎ ......
DHTMLÊÇ""dynamic HTML"(¶¯Ì¬HTML)µÄ¼ò³Æ.ÑϸñµØ˵,DHTML²¢²»ÊÇÒ»Ïîµ¥Ò»µÄм¼Êõ,¶øÊÇHTML,CSSºÍJavaScriptÕâÈýÖÖ¼¼Êõ½áºÏµÄ²úÎï.
DHTML±³ºóµÄº¬Òå:
ÀûÓÃHTML°ÑÍøÒ³±ê¼ÇΪ¸÷ÖÖÔªËØ;
&nbs ......
function object2String(obj)
{
var val, output = "";
if (obj)
{
output += "{";
for (var i in obj)
{
val = obj[i];
switch (typeof val)
{
case ("object"):if (val[0]){output += i + ":" + array2String(val) + &qu ......
Ç°¼¸Ìì×öÍøÕ¾µÄʱºòÐèÒª½²Êý¾Ý¿âÖеÄʱ¼ä¶ÁÈ¡µ½±äÁ¿ÖнøÐÐʹÓã¬Óõ½parseIntº¯Êý£¬½²×Ö·ûת»¯ÎªÊý×Ö¡£½ñÌì²âµÄʱºò·¢ÏÖÎÊÌâÁË£¬µ±Êý¾Ý¿âÖÐÔ·ÝΪ09µÄʱºò¾Í³öÎÊÌâÁË£¬ÓÃparseIntת»»Ö®ºó¾Í³É0ÁË¡£ºÃ²»½â¡£²âÁ˺þã¬Ã»Óз¢ÏÖÎÒ´úÂëÖеÄÎÊÌ⣬µ½googleËÑÁËһϣ¬²ÅÖªµÀÊÇÕâôһ»ØÊ¡£
¶ÔÓÚparseInt("01")µ½parseInt( ......