如何正确显示模式对话框showModalDialog中的中文?

时间:2010-06-28 18:24:00 

如何正确显示模式对话框中的中文?

msg.htm
   

<html>
    <head>
    <meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
    <meta HTTP-EQUIV="Content-Type" content="text/html;
     charset=gb_2312-80">
    <title>精彩春风之MsgBox应用</title>
    </head>
    <script langauge="javascript">
    function message(title,msg,type)
    {
    var ret=0;
    ret=showModalDialog(
    "msg.asp?itle="+title+"&msg="+msg+"&type="+type,
    "","dialogWidth:30;dialogHeight:8;center:1")
    return ret
    }
    // 此函数将调用方法简化,更象系统的MSGBOX
    </script>
    <body>
    <form method="POST" action="../_vti_bin/shtml.dll/msg/test.asp" webbot-action="--WEBBOT-SELF--">
    <p><input type="button" value="test" name="cmdTest1" language="javascript"
        onclick="alert(message('title','message is here',2))"></p>
    </form>
    </body>
    </html>

msg.asp

<%@ LANGUAGE="VBSCRIPT" %>
    <%
    dim title
    dim msg
    dim itype
    title=request("title")
    msg=request("msg")
    itype=request("type")
    %>
   
    <html>
    <head>
    <meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
    <meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb_2312-80">
    <title><%=title%></title>
    </head>
    <body language="javascript" onload="window.returnValue=0" topmargin="0" leftmargin="0" bgcolor="#000000" text="#FFFF00">
    <table border="0" cellpadding="0" width="100%" cellspacing="0">
    <tr>
    <td width="100%"><p align="center"><br><%=msg%><br>
    <br>
    <%if itype=0 then
         response.write "<input type='button' value='确定' name='cmdOk' onclick='window.returnValue=1;window.close()'>"
      elseif itype=1 then
        response.write "<input type='button' value='确定' name='cmdOk' onclick='window.returnValue=1;window.close()'>&nbsp;&nbsp;"
        response.write "<input type='button' value='取消' name='cmdCANCEL' onclick='window.returnValue=0;window.close()'>"
    elseif itype=2 then
        response.write "<input type='button' value='是' name='cmdYes' onclick='window.returnValue=1;window.close()'>&nbsp;&nbsp;"
        response.write "<input type='button' value='否' name='cmdNo' onclick='window.returnValue=0;window.close()'>"
    end if%>
    </td>
    </tr>
    </table>
    </body>
    </html>

标签:showModalDialog,对话框,中文
0
投稿

猜你喜欢

  • mysql 修改表结构 判断并添加column

    2010-10-25 20:07:00
  • Web2.0 体验式网站设计的41个关键点

    2008-08-10 17:49:00
  • ASP程序种如何调用DLL文件

    2008-01-15 19:12:00
  • 两个非常规ASP木马(可躲过扫描)

    2011-03-11 10:38:00
  • Chrome V8 引擎对 sort 的优化

    2010-02-04 17:27:00
  • 可以让程序告诉我详细的页面错误和数据库连接错误吗?

    2009-11-01 18:01:00
  • IE7的web标准之道 Ⅱ

    2008-08-13 12:50:00
  • 数字人组件反写[asp组件开发实例5]

    2009-06-09 13:23:00
  • 设置密码保护的SqlServer数据库备份文件与恢复文件的方法

    2011-11-03 16:55:30
  • sqlserver 不重复的随机数

    2012-02-12 15:29:29
  • MySQL数据库安全解决方案

    2009-10-17 21:36:00
  • 再谈 MySQL 数据库备份恢复和乱码问题

    2009-08-19 09:35:00
  • asp的access数据库备份 压缩 恢复及清理数据库函数

    2008-10-31 12:36:00
  • js友好的表单验证程序vform

    2007-08-16 13:32:00
  • asp如何实现对Session 数组的定义和调用?

    2010-05-18 18:40:00
  • 重命名SQLServer数据库的方法

    2012-07-11 15:39:37
  • 解析:轻松掌握 字符串文字字符集和校对

    2008-12-17 17:07:00
  • Linux系统下导出ORACLE数据库出现Exporting questionable statistics.错误 处理

    2010-07-16 13:27:00
  • sqlserver 快速生成汉字的首拼字母的函数(经典)

    2012-06-06 20:16:41
  • 理清mysql外链的含义和命令

    2010-03-09 15:55:00
  • asp之家 网络编程 m.aspxhome.com