<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hiroyuki nagata &#187; javascript</title>
	<atom:link href="http://hiroyuki-nagata.com/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://hiroyuki-nagata.com</link>
	<description>A merry heart makes a long life.</description>
	<lastBuildDate>Mon, 16 May 2011 04:26:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>三項演算子</title>
		<link>http://hiroyuki-nagata.com/javascript/%e4%b8%89%e9%a0%85%e6%bc%94%e7%ae%97%e5%ad%90/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e4%b8%89%e9%a0%85%e6%bc%94%e7%ae%97%e5%ad%90/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 04:55:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2008/09/30/%e4%b8%89%e9%a0%85%e6%bc%94%e7%ae%97%e5%ad%90/</guid>
		<description><![CDATA[プログラムを１から誰かに教わったわけではないので、
普通のプログラマなら知っているようなことでも、
知らないことが多い。
三項演算子、この存在を今まで知らなかった・・・
if文で書くとこんな感じですかね
まだ、まだ、理解 [...]]]></description>
			<content:encoded><![CDATA[<p>プログラムを１から誰かに教わったわけではないので、<br />
普通のプログラマなら知っているようなことでも、<br />
知らないことが多い。<br />
<a href="http://ja.wikipedia.org/wiki/%E4%B8%89%E9%A0%85%E6%BC%94%E7%AE%97%E5%AD%90" target="_blank">三項演算子</a>、この存在を今まで知らなかった・・・</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">c = a &gt; 10 ? a : b;</pre>
<p>if文で書くとこんな感じですかね</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
if( a &gt; 10 ){
　c = a;
}else{
　c = b;
}
</pre>
<p>まだ、まだ、理解していないところが多いです。<br />
簡単な条件式なら一行で済むので楽ですね。<br />
処理的には速いんでしょうか？<br />
最近Javascriptにもスピードを求められるようになっています。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e4%b8%89%e9%a0%85%e6%bc%94%e7%ae%97%e5%ad%90/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>href取得</title>
		<link>http://hiroyuki-nagata.com/javascript/href%e5%8f%96%e5%be%97/</link>
		<comments>http://hiroyuki-nagata.com/javascript/href%e5%8f%96%e5%be%97/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 10:11:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2007/06/22/href%e5%8f%96%e5%be%97/</guid>
		<description><![CDATA[概要
マウスをロールオーバーしたときに
そのaタグのhref値を取得しようとしたのですが、
IEは親切にも絶対パスで返してくれます。



IEとそれ以外のブラウザで試してください。
ここにマウスオーバーして下さい。

 [...]]]></description>
			<content:encoded><![CDATA[<h4>概要</h4>
<p>マウスをロールオーバーしたときに<br />
そのaタグのhref値を取得しようとしたのですが、<br />
IEは親切にも絶対パスで返してくれます。</p>
<p><script type="text/javascript">
<!--
function RollOver(obj){
var ob = $("txt");
ob.innerHTML = obj.getAttribute('href');
}
-->
</script></p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;;
function RollOver(obj){
var ob = $(&quot;txt&quot;);
ob.innerHTML = obj.getAttribute(&#039;href&#039;);
}
&lt;/script&gt;;
</pre>
<p>IEとそれ以外のブラウザで試してください。<br />
<a href="index.php" onmouseover="RollOver(this);">ここにマウスオーバーして下さい。</a></p>
<div id="txt"></div>
<p>ありがたいようで、迷惑・・・</p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/href%e5%8f%96%e5%be%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>スクロール座標を取得する</title>
		<link>http://hiroyuki-nagata.com/javascript/%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Tue, 15 May 2007 07:20:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2007/05/15/%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/</guid>
		<description><![CDATA[概要
スクロール座標を取得する
]]></description>
			<content:encoded><![CDATA[<h4>概要</h4>
<p>スクロール座標を取得する</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function scrollPos(){
if(document.all){
var scx = document.body.scrollLeft || document.documentElement.scrollLeft;
var scy = document.body.scrollTop || document.documentElement.scrollTop;
}else if(document.layers || document.getElementById){// スクロール位置をチェック（NN用）
var scx = pageXOffset;
var scy = pageYOffset;
}
return { x:scx, y:scy }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e3%82%b9%e3%82%af%e3%83%ad%e3%83%bc%e3%83%ab%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>入力時に背景色を変える。</title>
		<link>http://hiroyuki-nagata.com/javascript/%e5%85%a5%e5%8a%9b%e6%99%82%e3%81%ab%e8%83%8c%e6%99%af%e8%89%b2%e3%82%92%e5%a4%89%e3%81%88%e3%82%8b%e3%80%82/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e5%85%a5%e5%8a%9b%e6%99%82%e3%81%ab%e8%83%8c%e6%99%af%e8%89%b2%e3%82%92%e5%a4%89%e3%81%88%e3%82%8b%e3%80%82/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 13:54:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2007/04/18/%e5%85%a5%e5%8a%9b%e6%99%82%e3%81%ab%e8%83%8c%e6%99%af%e8%89%b2%e3%82%92%e5%a4%89%e3%81%88%e3%82%8b%e3%80%82/</guid>
		<description><![CDATA[概要
テキストエリアにフォーカスされたときに背景色を変更する




]]></description>
			<content:encoded><![CDATA[<h4>概要</h4>
<p>テキストエリアにフォーカスされたときに背景色を変更する</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function setInputFocus(){
var inputFocus = function(elm){
elm.style.backgroundColor=&amp;quot;#eeffee&amp;quot;;
}
var inputBlur= function(elm){
elm.style.backgroundColor=&amp;quot;#ffffff&amp;quot;;
}
　
if (!document.getElementsByTagName){ return; }

var anchors = document.getElementsByTagName(&#039;input&#039;);
for (var i=0; i&amp;lt;anchors.length; i++){
　
var anchor = anchors[i];
　
var idAttribute = String(anchor.getAttribute(&#039;type&#039;));
if ( idAttribute.toLowerCase().match(&#039;text&#039;) ){
anchor.onfocus = function () { inputFocus(this);}
anchor.onblur = function () { inputBlur(this);}
}
}
}
Event.observe(window, &#039;load&#039;, setInputFocus, false);
</pre>
<p><script>
<!--
function setInputFocus(){</p>
<p>var inputFocus = function(elm){
elm.style.backgroundColor="#eeffee";
}
var inputBlur = function(elm){
elm.style.backgroundColor="#ffffff";
}</p>
<p>　 if (!document.getElementsByTagName){ return; }
　 var anchors = document.getElementsByTagName('input');
　 for (var i=0; i<anchors.length; i++){
　　var anchor = anchors[i];</p>
<p>　  var idAttribute = String(anchor.getAttribute('type'));
if ( idAttribute.toLowerCase().match('text') ){
anchor.onfocus = function () { inputFocus(this);}
anchor.onblur = function () { inputBlur(this);}
}
}
}
Event.observe(window, 'load', setInputFocus, false);
-->
</script></p>
<input name="" type="text" value="この入力エリアを選択" />
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e5%85%a5%e5%8a%9b%e6%99%82%e3%81%ab%e8%83%8c%e6%99%af%e8%89%b2%e3%82%92%e5%a4%89%e3%81%88%e3%82%8b%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>javascriptライブラリを作ろう!</title>
		<link>http://hiroyuki-nagata.com/javascript/javascript%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86/</link>
		<comments>http://hiroyuki-nagata.com/javascript/javascript%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86/#comments</comments>
		<pubDate>Fri, 06 Apr 2007 15:06:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2007/04/07/javascript%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86/</guid>
		<description><![CDATA[がんばってみよう！
]]></description>
			<content:encoded><![CDATA[<p>がんばってみよう！</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
var $Obj = new Object();
$Obj = {
//////オブジェクト取得///////////////
get:function(prm){
if(document.getElementById &amp;&amp; !document.all || document.layers){
obj = document.getElementById(prm);
}else if(document.all){
obj = document.all(prm);
}
//if(!obj) alert(&quot;$Obj.get ID=&quot;+ prm +&quot; が見つかりません&quot;);
return obj;
},
///////レイヤー半透明//////////////
alpha:function(objName,alpha){
if(typeof(objName)==&quot;object&quot;) var alp = objName;
else var alp = $Obj.get (objName);
alp.style.Opacity = Number(alpha) / 100;
alp.style.filter = &#039;alpha(opacity=&#039; + Number(alpha) + &#039;)&#039;;
alp.style.MozOpacity = Number(alpha) / 100;
},
///////////指定したレイヤーの座標を取得///////////////
pos:function (eremID){
if(typeof(eremID)==&quot;object&quot;) var offsetTrail = eremID;
else var offsetTrail = $Obj.get(eremID);
var offsetLeft = 0;
var offsetTop = 0;
while(offsetTrail){
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
offsetTrail = offsetTrail.offsetParent;
}
if(navigator.userAgent.indexOf(&quot;Mac&quot;) != -1 &amp;&amp;
typeof document.body.leftMargin != &quot;undefined&quot;){
offsetLeft += document.body.leftMargin;
offsetTop += document.body.topMargin;
}
return{ left:offsetLeft , top:offsetTop }
}
}
var $Brw = new Object();
$Brw = {
///////ブラウザサイズを取得する//////////////
size:function (){
var agent = navigator.userAgent;
var appna = navigator.appName;
var userOs = null;
var browser = null;
var version = null;
var ie55 = false;
if ( agent.indexOf(&#039;Win&#039;) != -1 ){
if ( appna == &quot;Microsoft Internet Explorer&quot; ){
version = agent.substring((agent.indexOf(&#039;MSIE&#039;)+5),(agent.indexOf(&#039;MSIE&#039;)+8));
if(Number(version)&lt;=5.5){
ie55 = true;
}
}
}
if (document.all) {
if(window.opera || ie55){
brsHeight = document.body.clientHeight;
brsWidth = document.body.clientWidth;
}else{
brsHeight = document.documentElement.clientHeight;
brsWidth = document.documentElement.clientWidth;
}
}else if (document.getElementById &amp;&amp; !document.all || document.layers) {
brsHeight = window.innerHeight;
brsWidth = window.innerWidth;
}
return { height:brsHeight , width:brsWidth };
}
}
var $Date = new Object();
$Date = {
////////日付取得する/////////
get:function(){
var stoday = new Date();
var syear = stoday.getYear();
if( syear &lt; 1000) syear = syear + 1900;
var smonth = stoday.getMonth()+1;

return {
year: syear ,
month:smonth ,
date:stoday.getDate() ,
hours:stoday.getHours(),
minutes:stoday.getMinutes(),
seconds:stoday.getSeconds()
}
}
}
var $Evt = new Object();
$Evt = {
addLtn:function(elm, type, func, useCapture){
if(!elm){ return false;}
if(!useCapture){
useCapture = false;
}
if(elm.addEventListener){
elm.addEventListener(type, func, false);
}else if(elm.attachEvent){
elm.attachEvent(&#039;on&#039;+type, func);
}else{
return false;
}
return true;
},
remLtn:function(elm, type, func, useCapture){
if(!elm){ return false;}
if(!useCapture){
useCapture = false;
}
if(elm.removeEventListener){
elm.removeEventListener(type, func, false);
}else if(elm.detachEvent){
elm.detachEvent(&#039;on&#039;+type, func);
}else{
return false;
}
return true;
}
}
var $Ajax = new Object();
$Ajax = {
req:function(url,act){

var createXMLHttpRequest = function(func){
var XMLhttpObject = null;

if(window.XMLHttpRequest){
XMLhttpObject = new XMLHttpRequest();
}else if(window.ActiveXObject){
try{
XMLhttpObject = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);
}catch(e){
try{
XMLhttpObject = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
}catch(e){
return null;
}
}
}
if(XMLhttpObject) XMLhttpObject.onreadystatechange = func;

return XMLhttpObject;
}

var check = function(){
if((xmlhttp.readyState==4)&amp;&amp;(xmlhttp.status==200)){
act();
}else if(xmlhttp.readyState==4){
act();
}
}
xmlhttp = createXMLHttpRequest(check);
if(xmlhttp){
try{
xmlhttp.open(&quot;get&quot;,url, true);
xmlhttp.send(null);
}catch(e){
}
}
}

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/javascript%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>日付を取得する</title>
		<link>http://hiroyuki-nagata.com/javascript/%e6%97%a5%e4%bb%98%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e6%97%a5%e4%bb%98%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Tue, 27 Feb 2007 00:31:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2007/02/27/%e6%97%a5%e4%bb%98%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/</guid>
		<description><![CDATA[概要
日付を取得する

「日付を取得する。」ソースダウンロード
]]></description>
			<content:encoded><![CDATA[<h4 class="detail">概要</h4>
<p>日付を取得する</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function hirgetDate(){//日付取得
var stoday = new Date();
var syear = stoday.getYear();
if( syear &lt; 1000) syear = syear + 1900;
var smonth = stoday.getMonth()+1;

return {
year: syear ,
month:smonth ,
date:stoday.getDate() ,
hours:stoday.getHours(),
minutes:stoday.getMinutes(),
seconds:stoday.getSeconds()
}
}
</pre>
<p>
<a href="/common/data/200702/20070227.zip" id="dl">「日付を取得する。」ソースダウンロード</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e6%97%a5%e4%bb%98%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>指定したレイヤーの座標を取得</title>
		<link>http://hiroyuki-nagata.com/javascript/%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%9f%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e3%81%ae%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%9f%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e3%81%ae%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97/#comments</comments>
		<pubDate>Sat, 16 Sep 2006 04:00:43 +0000</pubDate>
		<dc:creator>Hiroyuki</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/09/16/%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%9f%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e3%81%ae%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97/</guid>
		<description><![CDATA[概要
指定したレイヤーの座標を取得します。

]]></description>
			<content:encoded><![CDATA[<h4 class="detail">概要</h4>
<p>指定したレイヤーの座標を取得します。</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function getElementPosition(eremID){
var offsetTrail = document.getElementById(eremID);
var offsetLeft = 0;
var offsetTop = 0;
while(offsetTrail){
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
offsetTrail = offsetTrail.offsetParent;
}
if(navigator.userAgent.indexOf(&amp;quot;Mac&amp;quot;) != -1 &amp;amp;&amp;amp;
typeof document.body.leftMargin != &amp;quot;undefined&amp;quot;){
offsetLeft += document.body.leftMargin;
offsetTop += document.body.topMargin;
}
return{ left:offsetLeft , top:offsetTop }
}
</pre>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%9f%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e3%81%ae%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>エンコード・デコード</title>
		<link>http://hiroyuki-nagata.com/javascript/%e3%82%a8%e3%83%b3%e3%82%b3%e3%83%bc%e3%83%89%e3%83%bb%e3%83%87%e3%82%b3%e3%83%bc%e3%83%89/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e3%82%a8%e3%83%b3%e3%82%b3%e3%83%bc%e3%83%89%e3%83%bb%e3%83%87%e3%82%b3%e3%83%bc%e3%83%89/#comments</comments>
		<pubDate>Wed, 06 Sep 2006 15:09:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/09/07/%e3%82%a8%e3%83%b3%e3%82%b3%e3%83%bc%e3%83%89%e3%83%bb%e3%83%87%e3%82%b3%e3%83%bc%e3%83%89/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><script>
<!--
function encodestr(param){
var par = escape($(param).value);
$("nx").value = par;
}
function decodestr(param){
var par = unescape($(param).value);
$("nx").value = par;
}
-->
</script><br />
<textarea cols="50" rows="5" id="pv"></textarea></p>
<p><a href="javascript:encodestr('pv');"> encode</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:decodestr('pv');"> decode</a></p>
<p><textarea cols="50" rows="5" id="nx"></textarea></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e3%82%a8%e3%83%b3%e3%82%b3%e3%83%bc%e3%83%89%e3%83%bb%e3%83%87%e3%82%b3%e3%83%bc%e3%83%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTMLにパラメータを渡す</title>
		<link>http://hiroyuki-nagata.com/javascript/html%e3%81%ab%e3%83%91%e3%83%a9%e3%83%a1%e3%83%bc%e3%82%bf%e3%82%92%e6%b8%a1%e3%81%99%e3%80%82/</link>
		<comments>http://hiroyuki-nagata.com/javascript/html%e3%81%ab%e3%83%91%e3%83%a9%e3%83%a1%e3%83%bc%e3%82%bf%e3%82%92%e6%b8%a1%e3%81%99%e3%80%82/#comments</comments>
		<pubDate>Wed, 09 Aug 2006 05:34:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/08/09/html%e3%81%ab%e3%83%91%e3%83%a9%e3%83%a1%e3%83%bc%e3%82%bf%e3%82%92%e6%b8%a1%e3%81%99%e3%80%82/</guid>
		<description><![CDATA[「HTMLにパラメータを渡す。」ソースダウンロード
]]></description>
			<content:encoded><![CDATA[<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function setValue(){
paramArray = new Array();
param = document.location.search;
param = param.substring(1,param.length);
param = param.split(&quot;&amp;&quot;);
for (i in param) {
spl = param[i].split(&quot;=&quot;);
paramArray[spl[0]] = unescape(spl[1]);
}
for (i in paramArray) {
document.forms[0].elements[i].value = paramArray[i];
}
}
</pre>
<p><a href="/common/data/200608/20060809.zip" id="dl">「HTMLにパラメータを渡す。」ソースダウンロード</a><br /></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/html%e3%81%ab%e3%83%91%e3%83%a9%e3%83%a1%e3%83%bc%e3%82%bf%e3%82%92%e6%b8%a1%e3%81%99%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>マウス座標を取得する。</title>
		<link>http://hiroyuki-nagata.com/javascript/%e3%83%9e%e3%82%a6%e3%82%b9%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e3%83%9e%e3%82%a6%e3%82%b9%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/#comments</comments>
		<pubDate>Sat, 05 Aug 2006 16:39:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/08/06/%e3%83%9e%e3%82%a6%e3%82%b9%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/</guid>
		<description><![CDATA[概要
prototype.jsを使用して、マウス座標を取得します。







]]></description>
			<content:encoded><![CDATA[<h4 class="detail">概要</h4>
<p>prototype.jsを使用して、マウス座標を取得します。</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
  function getMousePos(){
    var mousePos = function(event){
      var evnx = Event.pointerX(event);
      var evny = Event.pointerY(event);
      $(&#039;pos&#039;).innerHTML = (evnx + &quot; - &quot; + evny);
}
 Event.observe(document.body, &#039;mousemove&#039;, mousePos, false);
} //オンロード

Event.observe(window, &#039;load&#039;, getMousePos, false);
--&gt;
&lt;/script&gt;

&lt;div id=&quot;pos&quot;&gt;&lt;/div&gt;
</pre>
<p><script type="text/javascript">
<!--
function getMousePos(){
var mousePos = function(event){</p>
<p>var evnx = Event.pointerX(event);
var evny = Event.pointerY(event);</p>
<p>$('pos').innerHTML = (evnx + " - " + evny);
}</p>
<p>Event.observe(document.body, 'mousemove', mousePos, false);
}
Event.observe(window, 'load', getMousePos, false);
-->
</script></p>
<div class="detailCase">
<div id="pos"></div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e3%83%9e%e3%82%a6%e3%82%b9%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>レイヤー半透明</title>
		<link>http://hiroyuki-nagata.com/javascript/%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e5%8d%8a%e9%80%8f%e6%98%8e/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e5%8d%8a%e9%80%8f%e6%98%8e/#comments</comments>
		<pubDate>Wed, 26 Jul 2006 17:53:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/07/27/%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e5%8d%8a%e9%80%8f%e6%98%8e/</guid>
		<description><![CDATA[概要
半透明もブラウザによって違うようです。
早く統一してほしい。
「レイヤー半透明」ソースダウンロード
]]></description>
			<content:encoded><![CDATA[<h4 class="detail">概要</h4>
<p>半透明もブラウザによって違うようです。<br />
早く統一してほしい。</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function layerAlpha( obj , alpha ){
 obj.style.filter = &quot;alpha(opacity=&quot;+alpha+&quot;)&quot;; /* IE用 */
 obj.style.mozOpacity = alpha / 100; /* FireFox用 */
 obj.style.opacity = alpha / 100; /* Safari用 */
}
</pre>
<p><a href="/common/data/200607/20060727.zip" id="dl">「レイヤー半透明」ソースダウンロード</a><br /></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e3%83%ac%e3%82%a4%e3%83%a4%e3%83%bc%e5%8d%8a%e9%80%8f%e6%98%8e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>やっぱりprototype.js</title>
		<link>http://hiroyuki-nagata.com/javascript/%e3%82%84%e3%81%a3%e3%81%b1%e3%82%8aprototypejs/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e3%82%84%e3%81%a3%e3%81%b1%e3%82%8aprototypejs/#comments</comments>
		<pubDate>Wed, 26 Jul 2006 01:26:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/07/26/%e3%82%84%e3%81%a3%e3%81%b1%e3%82%8aprototypejs/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Ajaxにすごく役立つライブラリ<a href="http://prototype.conio.net/" target="_blank">prototype.js</a><br />
でも、マウス座標取得できても、レイヤー座標は取得できないよー<br />
だれか、クロスブラウザ対応のレイヤー座標の取得のしかた教えてｰ<br />
最近、仕事もプライベートも迷宮入りです。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e3%82%84%e3%81%a3%e3%81%b1%e3%82%8aprototypejs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ブラウザサイズを取得する。</title>
		<link>http://hiroyuki-nagata.com/javascript/%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/</link>
		<comments>http://hiroyuki-nagata.com/javascript/%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/#comments</comments>
		<pubDate>Sat, 15 Jul 2006 14:19:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/07/15/%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/</guid>
		<description><![CDATA[概要
ブラウザサイズを取得するのは、各ブラウザによって方法が違うようです。
関数作ってみた。
IE5.5以下はブラウザチェックをしています。
「ブラウザサイズを取得する。」ソースダウンロード
]]></description>
			<content:encoded><![CDATA[<h4 class="detail">概要</h4>
<p>ブラウザサイズを取得するのは、各ブラウザによって方法が違うようです。<br />
関数作ってみた。<br />
IE5.5以下はブラウザチェックをしています。</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function brsSize(
var agent = navigator.userAgent;
var appna = navigator.appName;
var userOs = null;
var browser = null;
var version = null;
var ie55 = false;
if ( agent.indexOf(&#039;Win&#039;) != -1 ){
if ( appna == &quot;Microsoft Internet Explorer&quot; ){
version = agent.substring((agent.indexOf(&#039;MSIE&#039;)+5),(agent.indexOf(&#039;MSIE&#039;)+8));

if(Number(version)&amp;lt;=5.5){
ie55 = true;
}
}
}
if (document.all) {
if(window.opera || ie55){
brsHeight = document.body.clientHeight;
brsWidth = document.body.clientWidth;
}else{
brsHeight = document.documentElement.clientHeight;
brsWidth = document.documentElement.clientWidth;
}
} else if (document.getElementById &amp;amp;&amp;amp; !document.all || document.layers) {
brsHeight = window.innerHeight;
brsWidth = window.innerWidth;
}
return { height:brsHeight , width:brsWidth };
}
</pre>
<p><a id="dl" href="/common/data/200607/20060715.zip">「ブラウザサイズを取得する。」ソースダウンロード</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>POP UPを考える</title>
		<link>http://hiroyuki-nagata.com/javascript/pop-up%e3%82%92%e8%80%83%e3%81%88%e3%82%8b/</link>
		<comments>http://hiroyuki-nagata.com/javascript/pop-up%e3%82%92%e8%80%83%e3%81%88%e3%82%8b/#comments</comments>
		<pubDate>Tue, 11 Jul 2006 17:35:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://ilr.heteml.jp/wordpress/2006/07/12/pop-up%e3%82%92%e8%80%83%e3%81%88%e3%82%8b/</guid>
		<description><![CDATA[概要
毎回ポップアップをするときに、
悩んでしまうのでとりあえず自分なりに統一。。。
解説
focusでウィンドウが一番上に表示されるようにしています。
リンク部分
解説
・上記のようにしておくと、javascriptを [...]]]></description>
			<content:encoded><![CDATA[<h4 class="detail">概要</h4>
<p>毎回ポップアップをするときに、<br />
悩んでしまうのでとりあえず自分なりに統一。。。</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small>
</div>
<pre name="code" class="jscript" style="margin:18px 0;">
function openBrWindow(theURL,winName,features) {
win=window.open(theURL,winName,features);
win.focus();
}
</pre>
<h6>解説</h6>
<p>focusでウィンドウが一番上に表示されるようにしています。</p>
<h5 class="detailCase">リンク部分</h5>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>XHTML</strong></small>
</div>
<pre name="code" class="xhtml" style="margin:18px 0;">
&lt;a href=&quot;リンク&quot; target=&quot;_blank&quot; onclick=&quot;javascript:openBrWindow(&#039;リンク&#039;,&#039;popup&#039;,&#039;scrollbars=yes,resizable=yes,width=800,height=650,location=yes,status=yes&#039;); return false;&quot;&gt;「ポップアップ」&lt;/a&gt;
</pre>
<h6>解説</h6>
<p>・上記のようにしておくと、javascriptを有効にしていないユーザは_blankでウィンドウが開きます。<br />
・フィッシング詐欺、セキュリティの面を考えて、「scrollbars」「resizable」「location」「status」は「yes」にしておく。</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://hiroyuki-nagata.com/javascript/pop-up%e3%82%92%e8%80%83%e3%81%88%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

