1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# search_form.rb japanese resource.
def googlej_form( button_name = "Google 検索", size = 20, default_text = "" )
first = %Q[<a href="https://www.google.com/">
<img src="https://www.google.com/logos/Logo_40wht.gif"
style="border-width: 0px; vertical-align: middle;" alt="Google"></a>]
last = %Q[<input type="hidden" name="hl" value="ja"><input type="hidden" name="ie" value="utf-8">]
search_form( "https://www.google.com/search", "q", button_name, size, default_text, first, last )
end
def google_form( button_name = "Google 検索", size = 20, default_text = "" )
googlej_form( button_name, size, default_text )
end
def yahooj_form( button_name = "Yahoo! 検索", size = 20, default_text = "" )
first = %Q[<a href="https://www.yahoo.co.jp/">
<img src="http://img.yahoo.co.jp/images/yahoojp_sm.gif"
style="border-width: 0px; vertical-align: middle;" alt="Yahoo! JAPAN"></a>]
search_form( "https://search.yahoo.co.jp/bin/search", "p", button_name, size, default_text, first, "" )
end
def yahoo_form( button_name = "Yahoo! 検索", size = 20, default_text = "" )
yahooj_form( button_name, size, default_text )
end
# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
|