JavaScript

jQueryのHTML雛形

HTML内にスクリプト記載の雛形

  • Googleホスティング
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script>
<!--
/* グローバル変数・関数定義 */

// == DOM Loaded Event
$(function(){

   /* jQueryイベント設定 */

});

-->
</script>
</head>
<body>

</body>
</html>

スクリプトを読み込みの雛形

HTML

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="myprogram.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>

JavaScriptプログラム(myprogram.js)


/* グローバル変数定義 */

/* 関数定義 */

// == DOM Loaded Event
$(function(){

/* ページ作成終了時のイベント定義 */

}); // -- End of DOM Loaded Event

Google ホスティング

http://code.google.com/intl/ja/apis/libraries/

jQuery

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

jQuery UI

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>

 

その他

ログ出力ライブラリ「Blackbird」

http://blog.verygoodtown.com/2011/04/javascript-log-viewer-blackbirdjs/

<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <script type="text/javascript" src="http://tatenosystem.com/blackbird/blackbird.js"></script>
  <link type="text/css" rel="Stylesheet" href="http://tatenosystem.com/blackbird/blackbird.css" />
</head>
<body>
<script language="JavaScript">
<!--
  log.debug( 'this is a debug message' );
  log.info( 'this is an info message' );
  log.warn( 'this is a warning message' );
  log.error( 'this is an error message' );
//-->
</script>
</body>
</html>