<?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>alert &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/alert/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Mon, 01 Oct 2012 08:23:03 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>JQuery的Alert插件</title>
		<link>https://www.mudbest.com/jquery%e7%9a%84alert%e6%8f%92%e4%bb%b6/</link>
		
		<dc:creator><![CDATA[hkshadow]]></dc:creator>
		<pubDate>Tue, 13 Mar 2012 09:38:04 +0000</pubDate>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[jquery-alert]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=924</guid>

					<description><![CDATA[使用它可以用来替换JScript中的alert,confirm,prompt 注意其中jquery.ui.dr ... <a title="JQuery的Alert插件" class="read-more" href="https://www.mudbest.com/jquery%e7%9a%84alert%e6%8f%92%e4%bb%b6/" aria-label="阅读 JQuery的Alert插件">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>使用它可以用来替换JScript中的alert,confirm,prompt</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!-- Dependencies --&gt;
&lt;script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery.ui.draggable.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;!-- Core files --&gt;
&lt;script src=&quot;jquery.alerts.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;link href=&quot;jquery.alerts.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
</pre>
<p>注意其中jquery.ui.draggable.js是用来实现拖拉的，如不需要这个功能不就不用引用。在目前最近的Jquery1.42下应用引用：<span id="more-924"></span></p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script src=&quot;Scripts/jquery-1.4.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;Scripts/jquery-ui-1.8.5.custom.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;Scripts/jquery.alerts.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;   
&lt;link href=&quot;Content/Style/jquery.alerts.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
</pre>
<p>主要方法有</p>
<p>jAlert(message, [title, callback]) 创建一个alert<br />
jConfirm(message, [title, callback]) 创建一个确认allert,支持callback<br />
jPrompt(message, [value, title, callback]) 创建一个提示框让用户输入值，支持callback如果你有提供</p>
<p>今天所用到的CODE：</p>
<p>JS部分</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;title&gt;test&lt;/title&gt;
&lt;script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery.ui.draggable.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery.alerts.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;link href=&quot;jquery.alerts.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
     $(document).ready(function () {
        
		 $(&quot;#btnAlert&quot;).click(function ()
           { jAlert('Pushed the alert button', 'Alert Dialog'); });
        
		
		 $(&quot;#btnPrompt&quot;).click(function () {
            jPrompt('Type some value:', '', 'Prompt Dialog', function (typedValue) {
                  if (typedValue) {
                      jAlert('You typed the following ' + typedValue);
                   }
             });
			 
         });
		 
	$(&quot;#confirm_button&quot;).click( function() {
		jConfirm('上传完成，是否继续上传', '操作提示', function(r) {
			if (r==false){
				jAlert('请完善文档相关资料', '操作提示',function(s) {
					if (s==true){
					top.location = &quot;/Member-Users-Mydoc-T-C.html&quot;;
					}
				})
			}
		});
	});
});   
	  
&lt;/script&gt;
&lt;/head&gt;
</pre>
<p>HTML部分：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;body&gt;
&lt;div&gt;
&lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
&lt;input type=&quot;button&quot; value=&quot;Alert Me&quot; id=&quot;btnAlert&quot; /&gt;
&lt;input type=&quot;button&quot; value=&quot;Prompt Me&quot; id=&quot;btnPrompt&quot; /&gt;
&lt;input type=&quot;button&quot; value=&quot;Pss&quot; id=&quot;confirm_button&quot; /&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>有3个范例，其中一个alert效果图如下：</p>
<p><a href="http://www.mudbest.com/924.action/alert3" rel="attachment wp-att-925"><img decoding="async" src="http://www.mudbest.com/wp-content/uploads/2012/03/alert3.jpg" target="__blank" alt="" title="alert3" width="337" height="129" class="alignnone size-full wp-image-925" /></a></p>
<p>实例demo:<br />
http://help.mudbest.com/jquery/jquery-alert/index_demo1.html<br />
http://help.mudbest.com/jquery/jquery-alert/index_demo2.html</p>
<p>插件完整包：<br />
<a href='http://www.mudbest.com/924.action/jquery-alert' rel='attachment wp-att-932' target="__blank">jquery-alert</a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
