最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

這里的spnPrev是怎么獲取到DOM元素的?

這里的spnPrev是怎么獲取到DOM元素的?

尼康老法絲 2017-06-08 09:52:37
既沒有調(diào)用原生DOM選擇器也沒有調(diào)用jquery選擇器。。直接用id就能獲取dom了嗎?疑惑<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">??? <head>??????? <title>微調(diào)按鈕插件</title>??????? <link href="http://yifanck.cn/data/jquery-ui.css" rel="stylesheet" type="text/css" />??????? <link href="style.css" rel="stylesheet" type="text/css" />??????? <script src="http://yifanck.cn/data/jquery-1.8.2.min.js" type="text/javascript"></script>??????? <script src="http://yifanck.cn/data/jquery-ui-1.9.2.min.js" type="text/javascript"></script>??? </head>?? ???? <body>??????? <div id="divtest">??????????? <div class="title">??????????????? 選擇顏色值</div>??????????? <div class="content">??????????????? <span id="spnColor" class="input fl">??????????????????? <input />??????????????? </span>??????????????? <span id="spnPrev" class="prev fr"></span>??????????? </div>??????? </div>?????? ???????? <script type="text/javascript">??????????? $(function () {??????????????? //定義變量??????????????? var intR = 0, intG = 0, intB = 0, strColor;??????????????? $('input').spinner({??????????????????? //初始化插件??????????????????? max: 10,??????????????????? min: 0,??????????????????? //設(shè)置微調(diào)按鈕遞增/遞減事件??????????????????? spin: function (event, ui) {??????????????????????? if (ui.value == 8)??????????????????????????? spnPrev.style.backgroundColor = "red";??????????????????????? else??????????????????????????? spnPrev.style.backgroundColor = "green";??????????????????? },??????????????????? //設(shè)置微調(diào)按鈕值改變事件??????????????????? change: function (event, ui) {??????????????????????? var intTmp = $(this).spinner("value");??????????????????????? if (intTmp < 0) $(this).spinner("value", 0);??????????????????????? if (intTmp > 10) $(this).spinner("value", 10);??????????????????????? if (intTmp == 8)??????????????????????????? spnPrev.style.backgroundColor = "red";??????????????????????? else??????????????????????????? spnPrev.style.backgroundColor = "green";??????????????????? }??????????????? });??????????? });??????? </script>??? </body></html>
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1271 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)