yeafee@夜飛郎

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

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            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 ="變身" ? /> <!-- 改變文本內容 -->
          ????
          < 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

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


          網站導航:
           
          主站蜘蛛池模板: 新郑市| 卫辉市| 九龙坡区| 博湖县| 聂拉木县| 井冈山市| 堆龙德庆县| 元氏县| 阳谷县| 饶河县| 金塔县| 弥渡县| 闽清县| 六安市| 嘉禾县| 淮南市| 南皮县| 麟游县| 青田县| 沈阳市| 岳普湖县| 衡山县| 西安市| 稷山县| 田阳县| 东丽区| 勃利县| 泰宁县| 郑州市| 辉县市| 罗山县| 禹州市| 大邑县| 日土县| 子洲县| 台山市| 崇阳县| 普兰店市| 乾安县| 右玉县| 馆陶县|