jQuery消息框中的问题 [英] Problem in jQuery message box

查看:62
本文介绍了jQuery消息框中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我试图用jquery显示留言框



Hi,

I trying to show message box using jquery

<script type="text/javascript">
     function ShowDialog(message) {
         $(function () {
             $("#dialog").html(message);
             $("#dialog").dialog({
                 title: "Message",
                 buttons: {
                     Close: function () {
                         $(this).dialog('close');
                     }
                 },
                 modal: true
             });
         });
     };
</script>
<div id="dialog" style="display: none">
    </div>



我从cs页面调用js方法,


I am calling js method from cs page,

ScriptManager.RegisterClientScriptBlock(this, GetType(), "Authentication Type", "JavaScript:ShowDialog('Testing');", true);



我收到以下错误


I am getting the below error

Microsoft JScript runtime error: '$' is undefined



请帮助。在此先感谢


Please help. Thanks in advance

推荐答案

function (){


#dialog)。html(message);
("#dialog").html(message);


#dialog)。dialog({
title: 消息
按钮:{
关闭:功能(){
("#dialog").dialog({ title: "Message", buttons: { Close: function () {


这篇关于jQuery消息框中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆