中文字幕日韩一区二区_国产一区二区av_国产毛片av_久久久久国产一区_色婷婷电影_国产一区二区精品

鼠標經過的文本框textbox變色

JS文件:
復制代碼 代碼如下:
function mouseAction() {
var textInputs = document.getElementsByTagName("input");
var len = textInputs.length;
var index = 0;
var textInput;
/*
也能用 for in 語句遍歷
for (textInput in textInputs){
textInputs[textInput].onmouseover = functionName;
}
*/
for( index = 0; index < len; index++ ) {
textInput = textInputs[index];
if( textInput.getAttribute("type") == "text" ){
textInput.onmouseover = function (){
//也能用這種方式 this.style.backgroundColor = "red";
this.className = "txtMouseOver"; //要先在HTML中引入CSS文件
}; //注意要加分號

textInput.onmouseout = function(){
this.className = "txtMouseOut";
};

textInput.onfocus = function(){
this.className = "txtMouseFocus";
};

textInput.onblur = function(){
this.className = "txtMouseBlur";
};
}
}
}

//也可以直接跟一個函數名,不要加引號,括號 window.onload = mouseAction;
window.onload = function(){
mouseAction();
};

CSS文件:
復制代碼 代碼如下:
/*主體居中顯示*/
body{
    width: 80%;
    height: 800px;
    position: relative;
    margin-left: 10%;
    /*left: -40%;*/
    border: #00CCFF solid thin;
}
.txtMouseOver
{
border-color: #9ecc00;
}
.txtMouseOut
{
border-color: #84a1bd;
}
.txtMouseFocus
{
border-color: #9ecc00;
background-color: #e8f9ff;
}
.txtMouseBlur
{
border-color: #84a1bd;
background-color: #ffffff;
}

JavaScript技術鼠標經過的文本框textbox變色,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产又爽又黄的视频 | 免费高潮视频95在线观看网站 | 青青草在线播放 | 久久久久久久久久毛片 | 国产精品美女久久久久久久久久久 | 伊人网综合在线观看 | 日本视频中文字幕 | 欧美在线国产精品 | 97福利在线 | 在线观看国产精品一区二区 | 婷婷狠狠 | 亚洲人在线 | 国产精品中文字幕一区二区三区 | 精品久久久久久红码专区 | 嫩草国产 | 综合五月婷 | 一区视频在线播放 | 浴室洗澡偷拍一区二区 | 日本特黄a级高清免费大片 特黄色一级毛片 | 欧美一区二区三区视频在线 | av免费电影在线 | 二区在线视频 | 色吊丝2288sds中文字幕 | 综合五月| 国产精品中文字幕在线 | 亚洲一区黄色 | 97超碰人人草| 亚洲综合精品 | 欧美一级免费 | 国产精品不卡 | 日韩成人免费中文字幕 | 成年网站在线观看 | 久久男人 | 毛片在线免费 | 黄色免费三级 | 亚洲国产精品日韩av不卡在线 | 久久99精品久久久久久国产越南 | 狠狠婷婷综合久久久久久妖精 | 亚洲成人一级 | 久久久精彩视频 | 精品国产乱码久久久久久蜜臀 |