【发布时间】:2013-10-24 13:47:47
【问题描述】:
我正在使用下面的 JQM 1.0 的对话脚本。 它工作正常,但我想从 asp.net codebehind 打开它 在 page_load 上。我怎么能做到这一点?
类似的东西,但我不能让它工作:
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "open", "opendialog", True)
// The JS:
<script type="text/javascript">
$(document).delegate('#opendialog', 'click', function () {
$('<div>').simpledialog2({
mode: 'blank',
headerText: 'Some Stuff',
headerClose: true,
blankContent:
"<ul data-role='listview'><li>Some</li><li>List</li><li>Items</li></ul>" +
"<a rel='close' data-role='button' href='#'>Close</a>"
})
})
</script>
<a href="#" id="opendialog" data-role="button">Open Dialog</a>
【问题讨论】:
-
我没有得到你的选择器。
$('<div>')? -
嗨,这是最简单的弹出示例
标签: jquery asp.net jquery-mobile