在.NET 2.0中,关于在子页面中调用JS文件和显示页面称
在以往的WEB中,我一般是
<%@ Page Language= "C# " AutoEventWireup= "true " CodeFile= "Default2.aspx.cs " Inherits= "Default2 " %>
<%@ Register
Assembly= "AjaxControlToolkit "
Namespace= "AjaxControlToolkit "
TagPrefix= "ajaxToolkit " %>
<!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= "time.js "> </script>
</head>
<body>
<form id= "form1 " runat= "server ">
<div>
<asp:ScriptManager ID= "ScriptManager1 " runat= "server ">
</asp:ScriptManager>
</div>
<asp:UpdatePanel ID= "UpdatePanel1 " runat= "server ">
<ContentTemplate>
<asp:Label ID= "Label1 " runat= "server " Text= "Label "> <script language= "JavaScript "> showTime(); </script> </asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
TIME.JS
function showTime()
{
function updateTime()
{
var label = document.getElementById( 'Label1 ');
if (label) {
var time = (new Date()).localeFormat( " ");
label.innerHTML = time;
&nb