1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務時間:8:30-17:00
      你可能遇到了下面的問題
      關閉右側工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      jquery中如何使用session

      小編給大家分享一下jquery中如何使用session,希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去探討吧!

      為企業(yè)提供網(wǎng)站設計、成都網(wǎng)站設計、網(wǎng)站優(yōu)化、全網(wǎng)營銷推廣、競價托管、品牌運營等營銷獲客服務。創(chuàng)新互聯(lián)擁有網(wǎng)絡營銷運營團隊,以豐富的互聯(lián)網(wǎng)營銷經(jīng)驗助力企業(yè)精準獲客,真正落地解決中小企業(yè)營銷獲客難題,做到“讓獲客更簡單”。自創(chuàng)立至今,成功用技術實力解決了企業(yè)“網(wǎng)站建設、網(wǎng)絡品牌塑造、網(wǎng)絡營銷”三大難題,同時降低了營銷成本,提高了有效客戶轉(zhuǎn)化率,獲得了眾多企業(yè)客戶的高度認可!

      在jquery中能用session,使用方法為:1、添加數(shù)據(jù),代碼為【$.session.set('key', 'value')】;2、刪除數(shù)據(jù),代碼為【$.session.remove('key')】。

      在jquery中能用session,使用方法為:

      添加數(shù)據(jù)

      $.session.set('key', 'value')

      刪除數(shù)據(jù)

      $.session.remove('key');

      獲取數(shù)據(jù)

      $.session.get('key');

      清除數(shù)據(jù)

      $.session.clear();

      以下為jquery文件代碼:新建復制即可使用

      /** *說明:不可以獲取java的session* 語法:添加數(shù)據(jù)$.session.set('key', 'value')
      刪除數(shù)據(jù)$.session.remove('key');
      獲取數(shù)據(jù)$.session.get('key');
      清除數(shù)據(jù)$.session.clear();*/
      (function($){
      $.session = {
      _id: null,
      _cookieCache: undefined,
      _init: function(){if (!window.name) {window.name = Math.random();}this._id = window.name;this._initCache();
      // See if we've changed protcols
      var matches = (new RegExp(this._generatePrefix() + "=([^;]+);")).exec(document.cookie);if (matches && document.location.protocol !== matches[1]) {this._clearSession();for (var key in this._cookieCache) {try {window.sessionStorage.setItem(key, this._cookieCache[key]);} catch (e) {};}}
      document.cookie = this._generatePrefix() + "=" + document.location.protocol + ';path=/;expires=' + (new Date((new Date).getTime() + 120000)).toUTCString();
      },
      _generatePrefix: function(){return '__session:' + this._id + ':';},
      _initCache: function(){var cookies = document.cookie.split(';');this._cookieCache = {};for (var i in cookies) {var kv = cookies[i].split('=');if ((new RegExp(this._generatePrefix() + '.+')).test(kv[0]) && kv[1]) {this._cookieCache[kv[0].split(':', 3)[2]] = kv[1];}}},
      _setFallback: function(key, value, onceOnly){var cookie = this._generatePrefix() + key + "=" + value + "; path=/";if (onceOnly) {cookie += "; expires=" + (new Date(Date.now() + 120000)).toUTCString();}document.cookie = cookie;this._cookieCache[key] = value;return this;},
      _getFallback: function(key){if (!this._cookieCache) {this._initCache();}return this._cookieCache[key];},
      _clearFallback: function(){for (var i in this._cookieCache) {document.cookie = this._generatePrefix() + i + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';}this._cookieCache = {};},
      _deleteFallback: function(key){document.cookie = this._generatePrefix() + key + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';delete this._cookieCache[key];},
      get: function(key){return window.sessionStorage.getItem(key) || this._getFallback(key);},
      set: function(key, value, onceOnly){try {window.sessionStorage.setItem(key, value);} catch (e) {}this._setFallback(key, value, onceOnly || false);return this;},'delete': function(key){return this.remove(key);},
      remove: function(key){try {window.sessionStorage.removeItem(key);} catch (e) {};this._deleteFallback(key);return this;},
      _clearSession: function(){try {window.sessionStorage.clear();} catch (e) {for (var i in window.sessionStorage) {window.sessionStorage.removeItem(i);}}},
      clear: function(){this._clearSession();this._clearFallback();return this;}
      };
      $.session._init();
      })(jQuery);

      看完了這篇文章,相信你對jquery中如何使用session有了一定的了解,想了解更多相關知識,歡迎關注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!


      當前標題:jquery中如何使用session
      瀏覽地址:http://ef60e0e.cn/article/igscpp.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        张家口市| 芜湖县| 余江县| 高陵县| 山西省| 龙海市| 鸡东县| 崇义县| 射阳县| 治多县| 驻马店市| 凤冈县| 思茅市| 崇礼县| 汽车| 怀仁县| 金川县| 周至县| 兴海县| 丹寨县| 瓮安县| 龙游县| 项城市| 吴川市| 利辛县| 同心县| 房产| 伊春市| 兴安盟| 黄浦区| 玉门市| 曲阳县| 六枝特区| 虹口区| 东城区| 称多县| 嘉峪关市| 确山县| 嵊泗县| 孝昌县| 吉木萨尔县|