首页 新闻 搜索 专区 学院

Jquery dialog 提交按钮 ?

0
[待解决问题]
<h4><span class="option">&nbsp;</span></h4> <h4><span class="option">$(<span style="color: #000000;">'</span><span style="color: #000000;">#opForm</span><span style="color: #000000;">'</span><span style="color: #000000;">).dialog({<br />&nbsp;&nbsp; autoOpen: </span><span style="color: #0000ff;">false</span><span style="color: #000000;">,<br />&nbsp;&nbsp; height: </span><span style="color: #000000;">476</span><span style="color: #000000;">,<br />&nbsp;&nbsp; width: </span><span style="color: #000000;">500</span><span style="color: #000000;">,<br />&nbsp;&nbsp; modal: </span><span style="color: #0000ff;">true</span><span style="color: #000000;">,<br />&nbsp;&nbsp; buttons:{<br />&nbsp;&nbsp;&nbsp; </span><span style="color: #000000;">'</span><span style="color: #000000;">提交</span><span style="color: #000000;">'</span><span style="color: #000000;"> : </span><span style="color: #0000ff;">function</span><span style="color: #000000;">() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #000000;">'</span><span style="color: #000000;">#depForm</span><span style="color: #000000;">'</span><span style="color: #000000;">).submit();<br />&nbsp;&nbsp;&nbsp; },</span><span style="color: #000000;">'</span><span style="color: #000000;">取消</span><span style="color: #000000;">'</span><span style="color: #000000;"> :</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</span><span style="color: #0000ff;">this</span><span style="color: #000000;">).dialog(</span><span style="color: #000000;">'</span><span style="color: #000000;">close</span><span style="color: #000000;">'</span><span style="color: #000000;">);<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; },<br />&nbsp;&nbsp;&nbsp; close: </span><span style="color: #0000ff;">function</span><span style="color: #000000;">() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #008000;">//</span><span style="color: #008000;"> $(this).dialog('destroy');</span><span style="color: #008000;"><br /></span><span style="color: #000000;">&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; });<br /></span></span></h4> <h4><span class="option">buttons</span> <span class="option">Object</span> <span class="option">{}</span> </h4> <div class="doc-detail option-detail" style="display: block;"> <p>设置对话框底部按钮,对象属性名为按钮文本,属性值为单击按钮时的回调函数。</p> <span class="option">{"确认":function(){ $(this).dialog("close"); }}</span> <div class="code"> <p class="code">代码示例</p> <p class="code">创建实例时设置属性值</p> <code>$(".class").dialog({buttons:{"确认":function(){ $(this).dialog("close"); }}});</code> <p class="code">实例化后得到属性值</p> <code>var buttons = $("#id").dialog("option","buttons");</code> <p class="code">实例化后设置属性值</p> <code>$("#id").dialog("option","buttons",{"确认":function(){ $(this).dialog("close"); }});</code></div> </div>
恶人鱼的主页 恶人鱼 | 初学一级 | 园豆:164
提问于:2010-09-09 23:44
< >
分享
所有回答(1)
0

你想说明什么?

Gray Zhang | 园豆:17610 (专家六级) | 2010-09-10 09:56
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册