Fight the Future

Java言語とJVM、そしてJavaエコシステム全般にまつわること

2010-06-04から1日間の記事一覧

JavaScript(jQuery)で指定した要素だけを印刷する

Ask Ben: Print Part Of A Web Page With jQueryを参考にしました。上記サイトで公開されてるコード。 //Create a jquery plugin that prints the given element. jQuery.fn.print = function(){ // NOTE: We are trimming the jQuery collection down to th…

JavaScript(jQuery)でオーバーレイした画面を表示する

画面にレイヤーをかぶせて子画面を表示するような、よくある作りを実装する。jQueryを使うけど、プラグインとしてFancyBoxを使うと楽にできた。 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="http://www.google.com/jsapi"></script> <script> google.load("jquery", "1.4.2"); </script> </meta></head></html>