下面是个超简单的编程实例 一个简单的智能感知效果教程,图老师小编精心挑选推荐,大家行行好,多给几个赞吧,小编吐血跪求~
【 tulaoshi.com - Web开发 】
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"HTMLHEADTITLE New Document /TITLEMETA NAME="Generator" CONTENT="EditPlus"META NAME="Author" CONTENT=""META NAME="Keywords" CONTENT=""META NAME="Description" CONTENT=""script language="javascript"var rowint = 0; //只需要把document.all("divFilteContent").innerHTML = 生成所需要的tablefunction doclick(){if(event.keyCode == 40 ){if(document.all("hidContent").value == ""){document.all("hidContent").value=document.all("txtContent").value;}if(rowint0){ tabContent.rows[rowint-1].style.background="";}if(rowinttabContent.rows.length){tabContent.rows[rowint].style.background="#eeeeee";document.all("txtContent").value = tabContent.rows[rowint].innerText;}if(rowint==tabContent.rows.length){document.all("txtContent").value=document.all("hidContent").value;tabContent.rows[rowint-1].style.background="";rowint = -1;}rowint ++;}else if(event.keyCode == 38){if(rowint1){rowint --;tabContent.rows[rowint-1].style.background="#eeeeee";document.all("txtContent").value = tabContent.rows[rowint-1].innerText;if(rowint0) { tabContent.rows[rowint].style.background="";}}}}/script /HEAD BODY onkeydown="doclick();"divinput type="text" id= "txtContent" width="260px" input type="hidden" id="hidContent"/div div id = "divFilteContent"table id="tabContent" width="151" style="border-left: 1px solid grid; border-right: 1px solid grid;border-bottom: 1px solid grid;" cellpadding="0" cellspacing="0"trtd1/td/trtrtd2/td/trtrtd3/td/trtrtd4/td/tr/table/div/BODY/HTML(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/webkaifa/)
来源:http://www.tulaoshi.com/n/20160219/1612887.html
看过《编程实例 一个简单的智能感知效果》的人还看了以下文章 更多>>