<?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>dialog box - itOffside.com | บทความการเขียนโปรแกรม เรื่องราวข้อมูลเทคโนโลยี</title>
	<atom:link href="https://www.itoffside.com/tag/dialog-box/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.itoffside.com</link>
	<description>ข้อมูลข่าวสารและเรื่องราวบนโลกของไอทีที่ ล้ำหน้า พร้อมสาระการเขียนโปรแกรมคอมพิวเตอร์</description>
	<lastBuildDate>Mon, 12 May 2014 15:38:39 +0000</lastBuildDate>
	<language>th</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://www.itoffside.com/wp-content/uploads/2020/04/cropped-favicon-96x96-1-32x32.png</url>
	<title>dialog box - itOffside.com | บทความการเขียนโปรแกรม เรื่องราวข้อมูลเทคโนโลยี</title>
	<link>https://www.itoffside.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>สร้าง Message boxes ด้วย jquery toastmessage plugin</title>
		<link>https://www.itoffside.com/jquery-toastmessage-plugin/</link>
					<comments>https://www.itoffside.com/jquery-toastmessage-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Onmobile]]></dc:creator>
		<pubDate>Mon, 12 May 2014 15:34:34 +0000</pubDate>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[dialog box]]></category>
		<category><![CDATA[jquery message box]]></category>
		<category><![CDATA[jquery toastmessage plugin]]></category>
		<category><![CDATA[message box]]></category>
		<category><![CDATA[popup jquery]]></category>
		<guid isPermaLink="false">https://www.itoffside.com/?p=220</guid>

					<description><![CDATA[<p>jquery-toastmessage-plugin คือปลักอินของ jquery ที่ผู้สร้างทำขึ้นมาเพื่อใช้งานในการแสดงข้อความที่สวยงาม การใช้งานง่ายๆ โดยคุณสามารถโหลดปลักอินได้ที่เว็บไซต์ http://akquinet.github.io/jquery-toastmessage-plugin/ หลังจากที่คุณดาวน์โหลดไฟล์ปลักอินมาแล้วให้นำมาไว้ที่โปรเจ็คหรือเว็บไซต์ของคุณโดยไฟล์ที่ดา...</p>
<p>The post <a href="https://www.itoffside.com/jquery-toastmessage-plugin/">สร้าง Message boxes ด้วย jquery toastmessage plugin</a> first appeared on <a href="https://www.itoffside.com">itOffside.com | บทความการเขียนโปรแกรม เรื่องราวข้อมูลเทคโนโลยี</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>jquery-toastmessage-plugin</strong> คือปลักอินของ jquery ที่ผู้สร้างทำขึ้นมาเพื่อใช้งานในการแสดงข้อความที่สวยงาม การใช้งานง่ายๆ โดยคุณสามารถโหลดปลักอินได้ที่เว็บไซต์ <a href="http://akquinet.github.io/jquery-toastmessage-plugin/" target="_blank">http://akquinet.github.io/jquery-toastmessage-plugin/</a> หลังจากที่คุณดาวน์โหลดไฟล์ปลักอินมาแล้วให้นำมาไว้ที่โปรเจ็คหรือเว็บไซต์ของคุณโดยไฟล์ที่ดาวน์โหลดจำเป็นต้องใชคือไฟล์<span id="more-220"></span></p>
<p>&#8211; jquery.toastmessage.js<br />
&#8211; jquery.toastmessage.css<br />
&#8211; โฟล์เดอร์ image</p>
<p>และไฟล์หลักๆที่ต้องใช้ jquery คุณสามารถดาวน์โหลดได้ที่เว็บไซต์ <a href="http://jquery.com/" target="_blank">http://jquery.com/ </a></p>
<p>หลังจากเตรียมไฟล์ให้คุณสร้างไฟล์<span style="color: #ff00ff;"> index.html</span> แล้วแทรก code CSS ไว้ภายใน &lt;header&gt;</p><pre class="crayon-plain-tag">&lt;link rel="stylesheet" href="css/jquery.toastmessage.css"&gt;</pre><p>และแทรก code javascript ไว้ภายใน &lt;header&gt;</p><pre class="crayon-plain-tag">&lt;script type="text/javascript" src="js/jquery.1.11.1.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascrpit" src="js/jquery.toastmessage.js"&gt;&lt;/script&gt;</pre><p>หลัง Add ไฟล์ ที่ต้องการใช้งานแล้วต่อไปเป็นวิธีการเรียกใช้งาน ให้เขียนคำสั่ง jquery ใน header (จริงๆไม่จำเป็นต้อง header อาจจะเป็นบรรทัดล่างสุดของ body)</p><pre class="crayon-plain-tag">&lt;script type="text/javascript"&gt;
            $(document).ready(function(){
                $().toastmessage('showNoticeToast','Hello message');
            });
        &lt;/script&gt;</pre><p>เสร็จเรียบร้อยแล้ว ลอง กด Refresh หน้าจอแล้วจะเห็นข้อความโชว์ตามรูปภาพตัวอย่างด้านล่าง<br />
<img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-224" src="https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery.jpg" alt="plugin-message-jquery" width="347" height="227" srcset="https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery.jpg 347w, https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery-300x196.jpg 300w" sizes="(max-width: 347px) 100vw, 347px" /></p>
<p>ขั้นตอนต่อไปผู้เขียนใช้ Event ตอน Click แล้วแสดงข้อความ โดยคุณสามารถเขียน code เพิ่มเติมตามตัวอย่างด้านล่างนี้ (เป็น Code เต็ม)</p><pre class="crayon-plain-tag">&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;itOffside.com : plugin message&lt;/title&gt;
        &lt;meta charset="UTF-8"&gt;
        &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
        &lt;link rel="stylesheet" href="css/jquery.toastmessage.css"&gt;
        &lt;script type="text/javascript" src="js/jquery.1.11.1.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="js/jquery.toastmessage.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript"&gt;
            $(document).ready(function() {
                $("#notice").click(function() {
                    $().toastmessage('showNoticeToast', 'สวัสดี itoffside.com');
                });
                $("#success").click(function() {
                    $().toastmessage('showSuccessToast', 'ข้อความสำเร็จ');
                });
                $("#warning").click(function() {
                    $().toastmessage('showWarningToast', 'ข้อความเตือน');
                });
                $("#error").click(function() {
                    $().toastmessage('showErrorToast', 'ข้อความเออเร่อ');
                });
            });
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;form&gt;
            &lt;input type="button" value="itoffside.com" id="notice"&gt;
            &lt;input type="button" value="Test message" id="success"&gt;
            &lt;input type="button" value="show now" id="warning"&gt;
            &lt;input type="button" value="show step" id="error"&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre><p>ผลลัพธ์ที่ได้</p>
<p><img decoding="async" class="alignnone size-full wp-image-225" src="https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery02.jpg" alt="plugin-message-jquery02" width="740" height="695" srcset="https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery02.jpg 740w, https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery02-300x281.jpg 300w" sizes="(max-width: 740px) 100vw, 740px" /></p>
<p>&nbsp;</p>
<p>ซึ่งหลายคนอาจจะต้องการปรับแต่งความสามารถการแสดงผลข้อความ สามารถปรับแต่งได้ที่ไฟล์<span style="color: #ff00ff;"> jquery.toastmessage.js</span> ใน code ด้านล่างนี้ ซึ่งจะเป็นการปรับแต่งทั้งระบบ</p>
<p><img decoding="async" class="alignnone size-full wp-image-226" src="https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery03.jpg" alt="plugin-message-jquery03" width="306" height="235" srcset="https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery03.jpg 306w, https://www.itoffside.com/wp-content/uploads/2014/05/plugin-message-jquery03-300x230.jpg 300w" sizes="(max-width: 306px) 100vw, 306px" /></p>
<p>และผู้อ่านสามารถปรับแต่งการแสดงข้อความได้ในไฟล์ <span style="color: #ff00ff;">index.html</span> (เฉพาะเจาะจงไฟล์ใดไฟล์หนึ่ง) เพิ่มเติมจาก Code เดิมเป็น</p><pre class="crayon-plain-tag">$("#notice").click(function() {
                    $().toastmessage('showToast', {
                        text : 'ปรับแต่งให้ข้อความอยู่หน้าจอ',
                        sticky : false,
                        type : 'notice',
                        position : 'middle-center'
                    });
                });</pre><p>Code เต็ม</p><pre class="crayon-plain-tag">&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;itOffside.com : plugin message&lt;/title&gt;
        &lt;meta charset="UTF-8"&gt;
        &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
        &lt;link rel="stylesheet" href="css/jquery.toastmessage.css"&gt;
        &lt;script type="text/javascript" src="js/jquery.1.11.1.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="js/jquery.toastmessage.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript"&gt;
            $(document).ready(function() {
                $("#notice").click(function() {
                    $().toastmessage('showToast', {
                        text : 'ปรับแต่งให้ข้อความอยู่หน้าจอ',
                        sticky : false,
                        type : 'notice',
                        position : 'middle-center'
                    });
                });
                $("#success").click(function() {
                    $().toastmessage('showSuccessToast', 'ข้อความสำเร็จ');
                });
                $("#warning").click(function() {
                    $().toastmessage('showWarningToast', 'ข้อความเตือน');
                });
                $("#error").click(function() {
                    $().toastmessage('showErrorToast', 'ข้อความเออเร่อ');
                });
            });
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;form&gt;
            &lt;input type="button" value="itoffside.com" id="notice"&gt;
            &lt;input type="button" value="Test message" id="success"&gt;
            &lt;input type="button" value="show now" id="warning"&gt;
            &lt;input type="button" value="show step" id="error"&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre><p>จบบทความสำหรับบทความนี้แล้วทางผมหวังว่าจะเป็นประโยชน์มากสำหรับทุกๆคนที่ต้องการกล่องข้อความที่เรียบง่ายและดูสวยงาม การใช้งานไม่ยากจนเกินไป หากผู้อ่านแล้วยังไม่เข้าใจในบทความ เขียน Comment เพิ่มเติมครับ</p><p>The post <a href="https://www.itoffside.com/jquery-toastmessage-plugin/">สร้าง Message boxes ด้วย jquery toastmessage plugin</a> first appeared on <a href="https://www.itoffside.com">itOffside.com | บทความการเขียนโปรแกรม เรื่องราวข้อมูลเทคโนโลยี</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.itoffside.com/jquery-toastmessage-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
