以下正确,CLICK可以显示<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Temp.aspx.cs" Inherits="Temp" %><!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 runat="server">
    <title>无标题页</title>
<script language="javascript"   type="text/javascript" >
// <!CDATA[function Button1_onclick() {
window.alert('ggggggggggg');
}function Text1_onclick() {
window.alert('gggggggggghhhhhhhhhhhhhhhhhhg');
}// ]]>
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
        <input id="Text1" type="text" onclick="return Text1_onclick()" /></div>
    </form>
</body>
</html>////////////////////////我将Calender.js拷贝到目录下,也就是加了枚花雨的SRC后就出错,为什么呢?,如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Temp.aspx.cs" Inherits="Temp" %><!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 runat="server">
    <title>无标题页</title>
<script language="javascript" src="JS/calendar.js"  type="text/javascript" >
// <!CDATA[function Button1_onclick() {
window.alert('ggggggggggg');
}function Text1_onclick() {
window.alert('gggggggggghhhhhhhhhhhhhhhhhhg');
}// ]]>
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
        <input id="Text1" type="text" onclick="return Text1_onclick()" /></div>
    </form>
</body>
</html>

解决方案 »

  1.   

    打开calendar.js,然后菜单file-->Advaneced Save Options-->Unicode (UTF-8 with signature) - Codepage 65001然后保存运行
      

  2.   

    singlepine(小山),不行啊!
    一加上src="JS/calendar.js"就弹不出对话框了.左下角标题拦提示 网页错误,
    急死了,是梅花雨3.0呀.
      

  3.   

    <script language="javascript"><!--#INCLUDE VIRTUAL="JS/calendar.js"--> </script>
    应该可以,昨天刚学的,管用
      

  4.   

    用<!--#INCLUDE VIRTUAL="js/calendar.js"-->实在不行自己做个。又不难
      

  5.   

    cxqhust1() ,我在.ASPX网页下还是出错,我疯了!!!!
      

  6.   

    不会吧,我用得好好的啊,也是在aspx下啊,具体什么错误啊