配布元:Plugins | jQuery Plugins jQuery Cookie ライセンス:MITライセンス 「jQuery Cookie」はJavaScriptで取り扱いがめんどくさいcookieについて簡単に取り扱えるようにするためのjQueryプラグインです。 利用方法 まずは、jQuery本体と配布元よりダウン... 続きを読む
Ruby #!/usr/local/bin/ruby -Ku require 'cgi' cgi = CGI.new # Cookie の受け取り count1 = cgi.cookies['count1'].first count2 = cgi.cookies['count2'].first # 発行する Cookie の定義 expires = Time.now + 60*60*24*30 cookies = [ # expires あり CGI:... 続きを読む
cgi - Rubyリファレンスマニュアル クッキー ▲ ▼簡単なサンプル test-cookie.rb、 →テスト 「use cookie?」にチェックを入れて「送信」するとクッキーが保存され、「Reload」しても入力情報が残ることを確認してください 0 1 2 3 4 5 6 7 8 9 10 11 12 13... 続きを読む
#! /usr/local/bin/ruby require "cgi" cgi = CGI.new # Cookieデータ取得 count = cgi.cookies['count'].first count = count.to_i + 1 # Cookieデータ作成 life = 30 * 24 * 60 * 60 expires = Time.now + life cookies = [ CGI::Cookie::new({ 'name' => 'co... 続きを読む