<?xml version="1.0" encoding="utf-8"?>

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:cc="http://web.resource.org/cc/"
  xmlns="http://purl.org/rss/1.0/">

<channel rdf:about="http://aok.cocolog-nifty.com/diary/">
<title>AOK&#39;s Blog</title>
<link>http://aok.cocolog-nifty.com/diary/</link>
<description>不定期に更新しています。MFC がメインです。</description>
<dc:language>ja-JP</dc:language>
<dc:creator></dc:creator>
<dc:date>2009-07-31T15:57:31+09:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.typepad.com/" />


<items>
<rdf:Seq><rdf:li rdf:resource="http://aok.cocolog-nifty.com/diary/2009/07/post-a941.html" />
<rdf:li rdf:resource="http://aok.cocolog-nifty.com/diary/2009/06/jqueryvalidator.html" />
<rdf:li rdf:resource="http://aok.cocolog-nifty.com/diary/2009/06/post-0454.html" />
<rdf:li rdf:resource="http://aok.cocolog-nifty.com/diary/2009/04/post-03c9.html" />
<rdf:li rdf:resource="http://aok.cocolog-nifty.com/diary/2009/04/excel-html-4487.html" />
</rdf:Seq>
</items>

</channel>

<item rdf:about="http://aok.cocolog-nifty.com/diary/2009/07/post-a941.html">
<title>指定したオブジェクトを取得</title>
<link>http://aok.cocolog-nifty.com/diary/2009/07/post-a941.html</link>
<description>JQuery もどきの関数を書いてみました。 /****************...</description>
<content:encoded>&lt;p&gt;JQuery もどきの関数を書いてみました。&lt;/p&gt;

&lt;pre&gt;&lt;span style=&quot;color: #c00000;&quot;&gt;/***************************************************

&amp;nbsp; &amp;nbsp; 指定したオブジェクトを取得する

&amp;nbsp; &amp;nbsp; #id, .class, それ以外はタグ名と看做す。
&amp;nbsp; &amp;nbsp; id の場合はオブジェクトを、
&amp;nbsp; &amp;nbsp; それ以外はオブジェクトの配列を返す。

 ***************************************************/&lt;/span&gt;
&lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; $ = &lt;span style=&quot;COLOR: blue&quot;&gt;function&lt;/span&gt;(selector) {
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;if&lt;/span&gt; (selector.charAt(0) == &lt;span style=&quot;COLOR: teal&quot;&gt;&#39;#&#39;&lt;/span&gt;)
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;return&lt;/span&gt; document.getElementById(selector.substring(1));
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;COLOR: blue&quot;&gt;if&lt;/span&gt; (selector.charAt(0) == &lt;span style=&quot;COLOR: teal&quot;&gt;&#39;.&#39;&lt;/span&gt;) {
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; elems = &lt;span style=&quot;COLOR: blue&quot;&gt;new&lt;/span&gt; Array();
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; all = document.getElementsByTagName(&lt;span style=&quot;COLOR: teal&quot;&gt;&#39;*&#39;&lt;/span&gt;);
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; re = &lt;span style=&quot;COLOR: blue&quot;&gt;new&lt;/span&gt; RegExp(&lt;span style=&quot;COLOR: teal&quot;&gt;&amp;quot;\\b&amp;quot;&lt;/span&gt; + selector.substring(1) + &lt;span style=&quot;COLOR: teal&quot;&gt;&amp;quot;\\b&amp;quot;&lt;/span&gt;);
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; i = 0; i &amp;lt; all.length; i++) {
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;COLOR: blue&quot;&gt;if&lt;/span&gt; (re.test(all[i].className))
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; elems.push(all[i]);
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;return&lt;/span&gt; elems;
&amp;nbsp; }
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;return&lt;/span&gt; document.getElementsByTagName(selector);
};&lt;/pre&gt;</content:encoded>


<dc:subject>JavaScript</dc:subject>

<dc:creator>AOK</dc:creator>
<dc:date>2009-07-31T15:57:31+09:00</dc:date>
</item>
<item rdf:about="http://aok.cocolog-nifty.com/diary/2009/06/jqueryvalidator.html">
<title>jQuery.validator.addMethod</title>
<link>http://aok.cocolog-nifty.com/diary/2009/06/jqueryvalidator.html</link>
<description>①半角カタカナでの入力を強制する。 jQuery.validator.addMe...</description>
<content:encoded>&lt;p&gt;①半角カタカナでの入力を強制する。&lt;/p&gt;

&lt;pre&gt;jQuery.validator.addMethod(&lt;span style=&quot;COLOR: teal&quot;&gt;&amp;quot;hankaku&amp;quot;&lt;/span&gt;, &lt;span style=&quot;COLOR: blue&quot;&gt;function&lt;/span&gt;(value, element) { 
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;COLOR: blue&quot;&gt;this&lt;/span&gt;.optional(element) || &lt;span style=&quot;color: #ff00cc;&quot;&gt;/^[｡-ﾟ]+$/&lt;/span&gt;i.test(value); 
}, &lt;span style=&quot;COLOR: teal&quot;&gt;&amp;quot; 半角カタカナで入力して下さい&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

&lt;p&gt;②全角カタカナでの入力を強制する。&lt;/p&gt;

&lt;pre&gt;jQuery.validator.addMethod(&lt;span style=&quot;COLOR: teal&quot;&gt;&amp;quot;zenkaku&amp;quot;&lt;/span&gt;, &lt;span style=&quot;COLOR: blue&quot;&gt;function&lt;/span&gt;(value, element) { 
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;COLOR: blue&quot;&gt;this&lt;/span&gt;.optional(element) || &lt;span style=&quot;color: #ff00cc;&quot;&gt;/^[ァ-ヾ]+$/&lt;/span&gt;i.test(value); 
}, &lt;span style=&quot;COLOR: teal&quot;&gt;&amp;quot; ※全角カタカナで入力して下さい&amp;quot;&lt;/span&gt;);&lt;/pre&gt;</content:encoded>


<dc:subject>JavaScript</dc:subject>

<dc:creator>AOK</dc:creator>
<dc:date>2009-06-23T09:46:03+09:00</dc:date>
</item>
<item rdf:about="http://aok.cocolog-nifty.com/diary/2009/06/post-0454.html">
<title>フレーム内のスクロール</title>
<link>http://aok.cocolog-nifty.com/diary/2009/06/post-0454.html</link>
<description>window.onload = function() { /* 配置した画像の年...</description>
<content:encoded>&lt;pre&gt;window.onload = &lt;span style=&quot;COLOR: blue&quot;&gt;function&lt;/span&gt;() {
&amp;nbsp; &lt;span style=&quot;color: #c00000;&quot;&gt;/* 配置した画像の年月 */&lt;/span&gt;
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; m = &lt;span style=&quot;COLOR: blue&quot;&gt;new&lt;/span&gt; Array(&lt;span style=&quot;COLOR: teal&quot;&gt;&#39;2009.5&#39;&lt;/span&gt;, &lt;span style=&quot;COLOR: teal&quot;&gt;&#39;2009.6&#39;&lt;/span&gt;, &lt;span style=&quot;COLOR: teal&quot;&gt;&#39;2009.7&#39;&lt;/span&gt;, &lt;span style=&quot;COLOR: teal&quot;&gt;&#39;2009.8&#39;&lt;/span&gt;, &lt;span style=&quot;COLOR: teal&quot;&gt;&#39;2009.9&#39;&lt;/span&gt;);
&amp;nbsp; &lt;span style=&quot;color: #c00000;&quot;&gt;/* 画像の幅 */&lt;/span&gt;
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; w = 300;
&amp;nbsp; &lt;span style=&quot;color: #c00000;&quot;&gt;/* フレームのスクロール */&lt;/span&gt;
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; d = &lt;span style=&quot;COLOR: blue&quot;&gt;new&lt;/span&gt; Date();
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; s = d.getFullYear() + &lt;span style=&quot;COLOR: teal&quot;&gt;&#39;.&#39;&lt;/span&gt; + (d.getMonth() + 1);
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; i = 0; i &amp;lt; m.length; i++) {
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;if&lt;/span&gt; (m[i] == s) {
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;window.frames[0].scrollTo(w * i, 0);
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;COLOR: blue&quot;&gt;break&lt;/span&gt;;
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; }
};&lt;/pre&gt;</content:encoded>


<dc:subject>JavaScript</dc:subject>

<dc:creator>AOK</dc:creator>
<dc:date>2009-06-04T13:22:40+09:00</dc:date>
</item>
<item rdf:about="http://aok.cocolog-nifty.com/diary/2009/04/post-03c9.html">
<title>イベントハンドラの登録</title>
<link>http://aok.cocolog-nifty.com/diary/2009/04/post-03c9.html</link>
<description>function addEvent(obj, ev, handler) { if (obj.addEventListener) obj.addEventListener(ev, handler, false); else if (obj.attachEvent) obj.attachEvent(on + ev, handler); else /* Caution! Override */ obj[on + ev] = handler; } function onEventHandler(e) { if (e == null) e = window.event; var obj...</description>
<content:encoded>&lt;pre&gt;&lt;span style=&quot;COLOR: blue&quot;&gt;function&lt;/span&gt; addEvent(obj, ev, handler) {
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;if&lt;/span&gt; (obj.addEventListener)
&amp;nbsp; &amp;nbsp; obj.addEventListener(ev, handler, &lt;span style=&quot;COLOR: blue&quot;&gt;false&lt;/span&gt;);
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;COLOR: blue&quot;&gt;if&lt;/span&gt; (obj.attachEvent)
&amp;nbsp; &amp;nbsp; obj.attachEvent(&lt;span style=&quot;COLOR: teal&quot;&gt;&#39;on&#39;&lt;/span&gt; + ev, handler);
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #c00000;&quot;&gt;/* Caution! Override */&lt;/span&gt;
&amp;nbsp; &amp;nbsp; obj[&lt;span style=&quot;COLOR: teal&quot;&gt;&#39;on&#39;&lt;/span&gt; + ev] = handler;
}

&lt;span style=&quot;COLOR: blue&quot;&gt;function&lt;/span&gt; onEventHandler(e) {
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;if&lt;/span&gt; (e == &lt;span style=&quot;COLOR: blue&quot;&gt;null&lt;/span&gt;) e = window.event;
&amp;nbsp; &lt;span style=&quot;COLOR: blue&quot;&gt;var&lt;/span&gt; obj = e.srcElement || e.target;
&amp;nbsp; &lt;span style=&quot;color: #c00000;&quot;&gt;/* ... Insert user code here ... */&lt;/span&gt;
}&lt;/pre&gt;</content:encoded>


<dc:subject>JavaScript</dc:subject>

<dc:creator>AOK</dc:creator>
<dc:date>2009-04-24T14:52:37+09:00</dc:date>
</item>
<item rdf:about="http://aok.cocolog-nifty.com/diary/2009/04/excel-html-4487.html">
<title>Excel → 加工しやすい HTML</title>
<link>http://aok.cocolog-nifty.com/diary/2009/04/excel-html-4487.html</link>
<description>Microsoft Excel 2000 から「Web ページとして保存」した ...</description>
<content:encoded>&lt;p&gt;Microsoft Excel 2000 から「Web ページとして保存」した HTML ファイルは、不要なタグが多過ぎて正直あまり使えません。そこで、&lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=209ADBEE-3FBD-482C-83B0-96FB79B74DED&amp;amp;displaylang=JA&quot;&gt;Microsoft Office HTML Filter 2.1&lt;/a&gt; を使って Office 独特のタグを取り除きますが、さらに、邪魔なものを &lt;a href=&quot;http://homepage3.nifty.com/aokura/jscript/regexp_js.html&quot;&gt;JavaScript の正規表現置換&lt;/a&gt;を使って削除します。&lt;/p&gt;

&lt;p&gt;【ルビの削除】&lt;/p&gt;

&lt;pre&gt;&amp;lt;ruby&amp;gt;([^&amp;lt;]+)&amp;lt;rt&amp;gt;([^&amp;lt;]+)&amp;lt;/rt&amp;gt;&amp;lt;/ruby&amp;gt; → $1&lt;/pre&gt;

&lt;p&gt;【幅と高さの指定の削除】&lt;/p&gt;

&lt;pre&gt;\s*height=\d+ → （削除）
\s*width=\d+ → （削除）&lt;/pre&gt;</content:encoded>


<dc:subject>JavaScript</dc:subject>

<dc:creator>AOK</dc:creator>
<dc:date>2009-04-17T10:18:37+09:00</dc:date>
</item>


</rdf:RDF>
