aspx全内容如下:cs文件无实际编码。<%@ Page language="c#" Codebehind="test.aspx.cs" AutoEventWireup="false" Inherits="WebTest.test" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html>
<head>
<title>test</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript" src="main.js"></script> </head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<input name="dd" type=text title="yyyymmdd" onfocus="inDateCtl(this)" onblur="outDateCtl(this)">
</form>
</body>
</html>问题:inDateCtl,outDateCtl无法找到,也就是main.js没有实际装载,为什么呢?但在html中有效,代码如下:
<html>
<head>
<script language="javascript" src="main.js"></script>
</head><body>
<input name="dd" type=text title="yyyymmdd" onfocus="inDateCtl(this)" onblur="outDateCtl(this)">
</body>
</html>问:
1、为什么在html中能用,而在aspx中不能用?
2、在aspx中使用的正确方法,有那些?(页面中写代码,或用<!--include -->除外)在线等,谢谢!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html>
<head>
<title>test</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript" src="main.js"></script> </head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<input name="dd" type=text title="yyyymmdd" onfocus="inDateCtl(this)" onblur="outDateCtl(this)">
</form>
</body>
</html>问题:inDateCtl,outDateCtl无法找到,也就是main.js没有实际装载,为什么呢?但在html中有效,代码如下:
<html>
<head>
<script language="javascript" src="main.js"></script>
</head><body>
<input name="dd" type=text title="yyyymmdd" onfocus="inDateCtl(this)" onblur="outDateCtl(this)">
</body>
</html>问:
1、为什么在html中能用,而在aspx中不能用?
2、在aspx中使用的正确方法,有那些?(页面中写代码,或用<!--include -->除外)在线等,谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货