yeafee@夜飛郎

          it's usually better to solve problems with simplicity and finesse rather than muscle.

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            33 隨筆 :: 3 文章 :: 2 評論 :: 0 Trackbacks

          ?

          <! 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 > jQuery?Tutorial?1--Hello?World? </ title >
          ????
          <!-- 引入jQuery?庫 -->
          ????
          < script? type ="text/javascript" ?src ="jquery-1.2.6.js" ></ script >
          < SCRIPT? LANGUAGE ="JavaScript" >
          <!--
          // 使用方式一,
          /* ????
          $(document).ready(function(){
          ?????$("#btnShow").click(?function(){?$("#divMsg").show('slow');});
          ?????$("#btnHide").click(?function(){?$("#divMsg").hide('slow');});
          ?????$("#btnChange").click(function(){?$("#divMsg").html("Hello?World,?我變身了");});
          ?????$("#btnInitTxt").click(function(){?$("#divMsg").html("Hello?World!");});
          });
          */

          // -->
          </ SCRIPT >

          </ head >
          < body >
          ????
          < div? id ="divMsg" > Hello?World! </ div >
          ????
          < input? id ="btnInitTxt" ?type ="button" ?value ="初始!" />
          ????
          < input? id ="btnChange" ?type ="button" ?value ="變身" ? /> <!-- 改變文本內(nèi)容 -->
          ????
          < input? id ="btnHide" ?type ="button" ?value ="隱藏" ? /> <!-- 隱藏文本 -->
          ????
          < input? id ="btnShow" ?type ="button" ?value ="顯示" ? /> <!-- 顯示文本 -->
          < script? type ="text/javascript" ? >
          // 使用方式二,
          ???????? // 以漸變的方式隱藏或顯示
          ????????$( " #btnShow " ).bind( " click " ,? function (event)? {
          ????????????
          // $("#divMsg").show('slow');?
          ????????????$( " #divMsg " ).show();?
          ????????}
          );
          ????????$(
          " #btnHide " ).bind( " click " ,? function (event)? {?$( " #divMsg " ).hide('slow');?} );
          ????????$(
          " #btnChange " ).bind( " click " ,? function (event)? {?$( " #divMsg " ).html( " Hello?World,?我變身了 " );?} );??
          ????????$(
          " #btnInitTxt " ).bind( " click " ,? function (event)? {?$( " #divMsg " ).html( " Hello?World! " );?} );??

          </ script >
          </ body >
          </ html >


          posted on 2011-01-28 10:49 @yeafee 閱讀(144) 評論(0)  編輯  收藏 所屬分類: JS&HTML

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 余江县| 冀州市| 阜平县| 根河市| 图木舒克市| 公安县| 广水市| 辽中县| 古丈县| 科技| 且末县| 保德县| 芒康县| 鸡东县| 阳谷县| 和林格尔县| 汉川市| 东海县| 寿阳县| 平远县| 包头市| 綦江县| 阿城市| SHOW| 沅陵县| 都兰县| 荥阳市| 湖南省| 册亨县| 阳原县| 沙坪坝区| 临夏县| 元江| 故城县| 石泉县| 吐鲁番市| 贡山| 汾西县| 建水县| 昌宁县| 南部县|