第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

open: function (event, ui) 在代碼中的作用?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
??? <head>
??????? <title>對(duì)話框插件</title>
??????? <link href="http://idcbgp.cn/data/jquery-ui.css" rel="stylesheet" type="text/css" />
??????? <link href="style.css" rel="stylesheet" type="text/css" />
??????? <script src="http://idcbgp.cn/data/jquery-1.8.2.min.js" type="text/javascript"></script>
??????? <script src="http://idcbgp.cn/data/jquery-ui-1.9.2.min.js" type="text/javascript"></script>
??? </head>
???
??? <body>
??????? <div id="divtest">
??????????? <div class="content">
??????????????? <span id="spnName" class="fl">張三</span>
??????????????? <input id="btnDelete" type="button" value="刪除"? class="fr"/>
??????????? </div>
??????????? <div id='dialog-modal'></div>
??????? </div>
???????
??????? <script type="text/javascript">
??????????? $(function () {
??????????????? $("#btnDelete").bind("click", function () { //詢問按鈕事件
??????????????????? if ($("#spnName").html() != null) { //如果對(duì)象不為空
??????????????????????? sys_Confirm("您真的要?jiǎng)h除該條記錄嗎?");
??????????????????????? return false;
??????????????????? }
??????????????? });
??????????? });
??????????? function sys_Confirm(content) { //彈出詢問信息窗口
???????????????? $("#dialog-modal").dialog({
??????????????????? height: 140,
??????????????????? modal: true,
??????????????????? title: '系統(tǒng)提示',
??????????????????? hide: 'slide',
??????????????????? buttons: {
??????????????????????? '確定': function () {
??????????????????????????? $("#spnName").remove();
??????????????????????????? $("#btnDelete").remove()
??????????????????????????? $(this).dialog("close");
??????????????????????? },
??????????????????????? '取消': function () {
??????????????????????????? $(this).dialog("close");
??????????????????????? }
??????????????????? },
??????????????????? open: function (event, ui) {
??????????????????????? $(this).html("");
??????????????????????? $(this).append("<p>" + content + "</p>");
??????????????????? }
??????????????? });
??????????? }
??????? </script>
??? </body>
</html>

正在回答

3 回答

event表示事件對(duì)象,ui表示觸發(fā)此事件的控件。

0 回復(fù) 有任何疑惑可以回復(fù)我~

open在此處是指事件,當(dāng)dialog打開時(shí),便會(huì)觸發(fā)改事件。

$(this).html(""); 是指把打開的dialog的內(nèi)容清空。
$(this).append("<p>" + content + "</p>");再給dialog的內(nèi)容部分賦值(傳入的參數(shù)content)

0 回復(fù) 有任何疑惑可以回復(fù)我~

這樣提問題幾乎是沒有人會(huì)回答你的

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕姐3102452 提問者

為什么呢?這段代碼我沒有看懂而已?怎樣提問題才會(huì)有人回答呢?
2016-05-23 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
jQuery基礎(chǔ)課程
  • 參與學(xué)習(xí)       154724    人
  • 解答問題       7289    個(gè)

加入課程學(xué)習(xí),有效提高前端開發(fā)速度

進(jìn)入課程

open: function (event, ui) 在代碼中的作用?

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)