<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://as5202t-5748.myasustor.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://as5202t-5748.myasustor.com/feed.php">
        <title>ria-web - study:javascript</title>
        <description></description>
        <link>https://as5202t-5748.myasustor.com/</link>
        <image rdf:resource="https://as5202t-5748.myasustor.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-07-05T12:22:41+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:array&amp;rev=1260852226&amp;do=diff"/>
                <rdf:li rdf:resource="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:debug&amp;rev=1316664948&amp;do=diff"/>
                <rdf:li rdf:resource="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:detect_browser&amp;rev=1211861312&amp;do=diff"/>
                <rdf:li rdf:resource="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:event&amp;rev=1205977880&amp;do=diff"/>
                <rdf:li rdf:resource="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:positioning&amp;rev=1312424002&amp;do=diff"/>
                <rdf:li rdf:resource="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:start&amp;rev=1424329642&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://as5202t-5748.myasustor.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>ria-web</title>
        <link>https://as5202t-5748.myasustor.com/</link>
        <url>https://as5202t-5748.myasustor.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:array&amp;rev=1260852226&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-12-15T04:43:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>array</title>
        <link>https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:array&amp;rev=1260852226&amp;do=diff</link>
        <description>Initialize an Array

1) Initialize the array when the load event is fired.


var initArray = [];
function init() {
  var fE = document.forms[&#039;testForm&#039;].elements;

  for(var i = 0; i &lt; 4; i++) {
    initArray[i] = fE[&#039;field&#039; + (i + 1)];
  }
}//



2) Store the field names and look them up in your functions</description>
    </item>
    <item rdf:about="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:debug&amp;rev=1316664948&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-09-22T04:15:48+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>debug</title>
        <link>https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:debug&amp;rev=1316664948&amp;do=diff</link>
        <description>Display error messages of javascript

以下のコードでjavascriptソースの何行目でエラーが発生しているか分かります。



onerror=handleErr;
var txt=&quot;&quot;;

//debug function
function handleErr(msg,url,l)
{
	txt=&quot;There was an error on this page.\n\n&quot;;
	txt+=&quot;Error: &quot; + msg + &quot;\n&quot;;
	txt+=&quot;URL: &quot; + url + &quot;\n&quot;;
	txt+=&quot;Line: &quot; + l + &quot;\n\n&quot;;
	txt+=&quot;Click OK to continue.\n\n&quot;;
	alert(txt);
	return true;
}</description>
    </item>
    <item rdf:about="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:detect_browser&amp;rev=1211861312&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-05-27T04:08:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>detect_browser</title>
        <link>https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:detect_browser&amp;rev=1211861312&amp;do=diff</link>
        <description>Detect a kind of browser and version


var isIE=false;		//Internet Explorer
var isNS=false;		//Netscape Navigator
var isOpera=false;	//Opera
var isFireFox=false;	//Firefox
var isSafari=false;	//Safari
var appVer;

/*
 * detect browser name and version
 * @version 1.1
*/
function browserDetect(){
	var versionIndex=0;
	//Netscape &amp; FireFox
	if(navigator.appName==&quot;Netscape&quot;){	// Mozilla Group
		//FireFox
		if(navigator.userAgent.indexOf(&quot;Firefox&quot;)!=-1){		
			isFireFox = true;
			versionIndex=naviga…</description>
    </item>
    <item rdf:about="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:event&amp;rev=1205977880&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2008-03-20T01:51:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>event</title>
        <link>https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:event&amp;rev=1205977880&amp;do=diff</link>
        <description>Mouse Cursor Position

document.compatMode

	*  Quirks mode[BACKCompat] : Standard-compliant mode is not switched on.
	*  Strict mode[CSS1Compat] : Standard-compliant mode is switched on.


function getPosition(e) {
    e = e || window.event;
    var cursor = {x:0, y:0};
    if (e.pageX || e.pageY) {
        cursor.x = e.pageX;
        cursor.y = e.pageY;
    } 
    else {
        var de = document.documentElement;
        var b = document.body;
        cursor.x = e.clientX + 
            (de.sc…</description>
    </item>
    <item rdf:about="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:positioning&amp;rev=1312424002&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-08-04T02:13:22+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>positioning</title>
        <link>https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:positioning&amp;rev=1312424002&amp;do=diff</link>
        <description>Fixed Layer

Frame을 사용하지 않고 navigation이 고정된 채로 내용만 scroll되도록 만들어보자.
FireFox라면 position:fixed를 사용할 수 있겠지만, IE가 지원하지 않기 때문에 
cross-browing을 생각하여 javascript와 css를 이용하여 구현해 보겠다.
간단하게 left navigation과 content두 column으로 구성된 page를 생각해보자.
css code snippet은 대략 다음과 같은 모습이다.</description>
    </item>
    <item rdf:about="https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:start&amp;rev=1424329642&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-02-19T07:07:22+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>start</title>
        <link>https://as5202t-5748.myasustor.com/doku.php?id=study:javascript:start&amp;rev=1424329642&amp;do=diff</link>
        <description>Set Cookie&#039;s expire date


function saveCookie(){
   var targetDate = new Date();
   var dateInMs = targetDate.getTime();

   dateInMs += 60 * 60 * 24 * 1000 * 365;	//有効期限1年間

   targetDate.setTime(dateInMs);
        
   tmp = &quot;多国語対応 non-ascii characters&quot;;
   document.cookie = &quot;cookieInfo=&quot;+escape(tmp)+&quot;; expires=&quot; + targetDate.toGMTString();	
}</description>
    </item>
</rdf:RDF>
