爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
输入框自动匹配效果
输入框自动匹配效果
日期:2014-05-18 浏览次数:20237 次
以下是程序代码
<HTML> <HEAD> <meta name="keywords" content="站长,网页特效,js特效,广告代码,zzjs,zzjs.net,sky,www.zzjs.net,站长特效 网" /> <meta name="description" content="www.zzjs.net,站长特效网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在站长特效网" /> <title>模仿IE自动完成功能,读取输入框存取记录,sky整理收集,站长特效欢迎您。</title> <style> body,div { font-family:verdana; line-height:100%; font-size:9pt; } input { width:300px; } h1 { text-align:center; font-size:2.2em; } #divf { margin:10px; font-size:0.8em; text-align:center; } #divc { border:1px solid #333333; } .des { width:500px; background-color:lightyellow; border:1px solid #333; padding:20px; margin-top:20px; } .mouseover { color:#ffffff; background-color:highlight; width:100%; cursor:default; } .mouseout { color:#000000; width:100%; background-color:#ffffff; cursor:default; } </style> <SCRIPT LANGUAGE="JavaScript"> <!-- function jsAuto(instanceName,objID) { this._msg = []; this._x = null; this._o = document.getElementById( objID ); if (!this._o) return; this._f = null; this._i = instanceName; this._r = null; this._c = 0; this._s = false; this._v = null; this._o.style.visibility = "hidden"; this._o.style.position = "absolute"; this._o.style.zIndex = "9999"; this._o.style.overflow = "auto"; this._o.style.height = "150"; return this; }; jsAuto.prototype.directionKey=function() { with (this) {//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 var e = _e.keyCode ? _e.keyCode : _e.which; var l = _o.childNodes.length; (_c>l-1 || _c<0) ? _s=false : ""; if( e==40 && _s ) { _o.childNodes[_c].className="mouseout"; (_c >= l-1) ? _c=0 : _c ++; _o.childNodes[_c].className="mouseover"; } if( e==38 && _s ) { _o.childNodes[_c].className="mouseout"; _c--<=0 ? _c = _o.childNodes.length-1 : ""; _o.childNodes[_c].className="mouseover"; } if( e==13 ) { if(_o.childNodes[_c] && _o.style.visibility=="visible") { _r.value = _x[_c]; _o.style.visibility = "hidden"; } } if( !_s ) { _c = 0; _o.childNodes[_c].className="mouseover"; _s = true; } }}; // mouseEvent. jsAuto.prototype.domouseover=function(obj) { with (this) { _o.childNodes[_c].className = "mouseout"; _c = 0; obj.tagName=="DIV" ? obj.className="mouseover" : obj.parentElement.className="mouseover"; }}; jsAuto.prototype.domouseout=function(obj) { obj.tagName=="DIV" ? obj.className="mouseout" : obj.parentElement.className="mouseout"; }; jsAuto.prototype.doclick=function(msg) { with (this) { if(_r) { _r.value = msg; _o.style.visibility = "hidden"; } else { alert("javascript autocomplete ERROR :\n\n can not get return object."); return; } }}; // object method; jsAuto.prototype.item=function(msg) { if( msg.indexOf(",")>0 ) { var arrMsg=msg.split(","); for(var i=0; i<arrMsg.length; i++) { arrMsg[i] ? this._msg.push(arrMsg[i]) : ""; } } else { this._msg.push(msg); } this._msg.sort(); }; jsAuto.prototype.append=function(msg) { with (this) {//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 _i ? "" : _i = eval(_i); _x.push(msg); var div = document.createElement("DIV"); //bind event to object. div.onmouseover = function(){_i.domouseover(this)}; div.onmouseout = function(){_i.domouseout(this)}; div.onclick = function(){_i.doclick(msg)}; var re = new RegExp("(" + _v + ")","i"); div.style.lineHeight="140%"; div.className = "mouseout"; if (_v) div.innerHTML = msg.replace(re , "<strong>$1</strong>"); div.style.fontFamily = "verdana"; _o.appendChild(div); }}; jsAuto.prototype.display=function() { with(this) { if(_f&&_v!="") { _o.style.left = _r.offsetLeft; _o.style.width = _r.offsetWidth; _o.style.top = _r.offsetTop + _r
上一篇:狡猾的按钮特效
下一篇:输入框里的小动画
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
IT时代周刊总编辑曹健:投资人刘志硕印象记
中国首台比特币ATM登陆上海 可购买不可兑换现钞
雅安地震救灾前线的科技之手 微弱而暖和
靠价格战赚取资费套餐利润差,虚拟运营商必死无疑
史玉柱此刻离任:营销巨匠为新游戏炒作?
支付宝服务窗后台首曝光 开放用户消费数据
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
腾讯为何在与阿里百度的收购比赛中当看客?
乐视28日发布手机进展 LeUI系统Mobile版或曝光
推荐阅读
更多>
苹果CEO抱歉解读:是战略而非“屈服”
英特尔涉嫌垄断 欧盟或开出史上最高罚单
首批四款“官方”打车软件发布:均为安卓版本
解析2014年阿里百度等五大互联网巨头深度布局
神州泰岳雪上加霜:副总违规买卖遭罚
中移动落马高管盘点:广东移动成反腐重地
中兴引进黑莓三个核心团队
迅雷高管解读财报:收购快盘可快速融入小米
去看看外面的世界吧!别窝里斗了,中国在线旅游商们
蓝宝石PK大猩猩玻璃:作为屏幕谁更有优势?
腾讯微信昨晚再现大规模故障 多地受到影响
都是300元内 乐视盒子与小米盒子对比体验
乐视28日发布手机进展 LeUI系统Mobile版或曝光
金山毒霸安全中心: XP退役后首个高危漏洞来了
优酷土豆携手新浪微博 谋攻移动视频失地
微软提示XP只剩365天寿命:用户被绑架?
中国大陆人口13.7亿 光棍越来越多
“宽带中国”计划已正式上升为国家战略
从百度世界大会看大数据
微软与摩托罗拉授权协议涵盖Android和Chrome设备