▼デフォルト
▼HTML5構文
<!DOCTYPE HTML>
<html>
<head>
<title>設置サンプル</title>
<link rel="canonical" href="http://www.example.com" /><!-- +1を関連付けるURL -->
<script type="text/javascript" src="http://apis.google.com/js/plusone.js">{lang: 'ja'}</script>
<script type="text/javascript">
/* コールバック関数 */
function func(json){
alert("+1ボタンが"+json.state.toUpperCase()+"されました。\n"+json.href);
}
</script>
<link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
<body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP & JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
<p>▼デフォルト</p>
<g:plusone size="standard" count="true" callback="func"></g:plusone>
<p>▼HTML5構文</p>
<div class="g-plusone" data-size="standard" count="true" callback="func"></div>
</body>
</html>