[待解决问题]
<h4><span class="option"> </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 /> autoOpen: </span><span style="color: #0000ff;">false</span><span style="color: #000000;">,<br /> height: </span><span style="color: #000000;">476</span><span style="color: #000000;">,<br /> width: </span><span style="color: #000000;">500</span><span style="color: #000000;">,<br /> modal: </span><span style="color: #0000ff;">true</span><span style="color: #000000;">,<br /> buttons:{<br /> </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 /> $(</span><span style="color: #000000;">'</span><span style="color: #000000;">#depForm</span><span style="color: #000000;">'</span><span style="color: #000000;">).submit();<br /> },</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 /> $(</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 /> }<br /> },<br /> close: </span><span style="color: #0000ff;">function</span><span style="color: #000000;">() {<br /> </span><span style="color: #008000;">//</span><span style="color: #008000;"> $(this).dialog('destroy');</span><span style="color: #008000;"><br /></span><span style="color: #000000;"> }<br /> });<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>
恶人鱼
|
初学一级
|
园豆:
166
提问于:2010-09-09 23:44