javascript±í¸ñÅÅÐò
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Power Table</title>
<style>
body{
FONT-SIZE: 9pt; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;
}
input {
FONT-SIZE: 9pt; height: 15pt; width:50px; cursor: default;
}
table{
font-size: 9pt;
word-break:break-all;
cursor: default;
BORDER: black 1px solid;
background-color:#eeeecc;
border-collapse:collapse;
border-Color:#999999;
align:center;
}
</style>
<script language="JavaScript1.2">
/*
The following codes are designed and writen by Windy_sk <seasonx@163.net>
You can use it freely, but u must held all the copyright items!
*/
var Main_Tab = null;
var cur_row = null;
var cur_col = null;
var cur_cell = null;
var Org_con = "";
var sort_col = null;
var show_col = false;
var charMode = true;
var act_bgc = "#BEC5DE";
var act_fc = "black";
var cur_bgc = "#ccffcc";
var cur_fc = "black";
function init(){
cur_row = null;
cur_col = null;
cur_cell = null;
sort_col = null;
Main_Tab = PowerTable;
read_def(Main_Tab)
Main_Tab.onmouseover = overIt;
Main_Tab.onmouseout = outIt;
Main_Tab.onclick = clickIt;
Main_Tab.ondblclick = dblclickIt;
Org_con = Main_Tab.outerHTML;
arrowUp = document.createElement("SPAN");
arrowUp.innerHTML = "5";
arrowUp.style.cssText = "PADDING-RIGHT: 0px; MARGIN-TOP: -3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; PADDING-BOTTOM: 2px; OVERFLOW: hidden; WIDTH: 10px; COLOR: blue; PADDING-TOP: 0px; FONT-FAMILY: webdings; HEIGHT: 11px";
arrowDown = document.createElement("SPAN");
arrowDown.innerHTML = "6";
arrowDown.style.cssText = "PADDING-RIGHT: 0px; MARGIN-TOP: -3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; PADDING-BOTTOM: 2px; OVERFLOW: hidden; WIDTH: 10px; COLOR: blue; PADDING-TOP: 0px; FONT-FAMILY: webdings; HEIGHT: 11px";
}
function window.onload(){
init();
drag = docu
Ïà¹ØÎĵµ£º
1¡¢Êý×éµÄ´´½¨
var arrayObj = new Array();¡¡//´´½¨Ò»¸öÊý×é
var arrayObj = new Array([size]);¡¡//´´½¨Ò»¸öÊý×é²¢Ö¸¶¨³¤¶È£¬×¢Òâ²»ÊÇÉÏÏÞ£¬Êdz¤¶È
var arrayObj = new Array([element0[, element1[, ...[, elementN]]]]);¡¡´´½¨Ò»¸öÊý×é²¢¸³Öµ
Ҫ˵Ã÷µÄÊÇ£¬ËäÈ»µÚ¶þÖÖ·½·¨´´½¨Êý×éÖ¸¶¨Á˳¤¶È£¬µ«Êµ¼ÊÉÏËùÓ ......
»ÆÉ«²¿·ÖΪdate.js
<script type="text/javascript" src="/js/date.js"></script>
<input name="date" type="text" id="date" onBlur="checkDay(this)" style="width:160px;" /><INPUT class="button" style="WIDTH: 64px; HEIGHT: 24px" onClick="setday(this,date)"type="button" value="Ñ¡ÔñÈÕÆÚ ......
1.Îı¾¿ò
1.1 <input type="text" name="test" id="test">
ͨ¹ývar t=document.getElementById("test").value°ÑÖµ¸³¸ø±äÁ¿t,
1.2 µ±È»Ò²¿ÉÒÔ·´¹ýÀ´°ÑÒÑÖªµÄ±äÁ¿Öµ¸³¸øÎı¾¿ò£¬ÀýÈ磺
var m = "5";
document.getElementById("test").value= m;
2.ÏÂÀÁбí¿ò
2.1 <select name="sel" id="sel" onchange ......
<P>JScript ÖеÄÔËËã·ûÓÅÏȼ¶ÊÇÒ»Ì×¹æÔò¡£¸Ã¹æÔòÔÚ¼ÆËã±í´ïʽʱ¿ØÖÆÔËËã·ûÖ´ÐеÄ˳Ðò¡£¾ßÓнϸßÓÅÏȼ¶µÄÔËËã·ûÏÈÓڽϵÍÓÅÏȼ¶µÄÔËËã·ûÖ´ÐС£ÀýÈ磬³Ë·¨µÄÖ´ÐÐÏÈÓÚ¼Ó·¨¡£</P>
<P>ÏÂ±í°´´Ó×î¸ßµ½×îµÍµÄÓÅÏȼ¶Áгö JScript ÔËËã·û¡£¾ßÓÐÏàͬÓÅÏȼ¶µÄÔËËã·û°´´Ó×óÖÁÓÒµÄ˳ÐòÇóÖµ¡£</P>
<DIV ......
·â×°£ºÍ¨¹ý±Õ°ü²ÅËãµÄÉÏÊÇÕæÕýÒâÒåÉϵķâ×°
<script type="text/javascript">
function myInfo(){
var name ="ÀÏÓã",age =27;
var myInfo = "my name is" + name + "i am" + age  ......