如何在jquery框架对话框中设置消息?

时间:2013-01-29 08:52:34

标签: jquery c#-4.0 dialog message

我正在创建一个div,然后我在同一个内部编写一条消息,但是这次我的div还必须包含ID,这是动态的,所以我想动态地写消息。 但我无法获得如何在我的jquery函数中编写消息。以下是我的代码:

 $(function confirm () {
                         $('#update-dialog').dialog({
                         modal: true,
                         buttons: {
                          Ok: function () {
                          $(this).dialog('close');
                            }
                          }
                          });
                        });

我的Div是:

 <div id="update-dialog" title="Mortgage Application Lock" style="display: none">
   <%-- <span class="textfont">This Mortgage Application is currently in use.</span>--%>
</div>

它必须有来自功能的信息,而不是硬写的。

1 个答案:

答案 0 :(得分:0)

$( "#update-dialog" ).dialog({open: function( event, ui ) { $(this).html("my recurring message other than hard written with html"); } });