脚本输出问题
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EasyAJAX._Default" %>
<!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>Untitled Page</title>
<script type="text/javascript">
function s_gethuman()
{
alert("你好");
}
</script>
</head>
<body>
<form id="form1" runat="server">
</form>
</body>
</html>
aspx页面和在cs文件里输出一个段脚本
Page.RegistClientScriptBlock ("d","<script>function s_gethuman(){alert('你好');}</script>")
哪个效率更高,更节省服务器资源。
可是aspx页面也需要服务器解析的,感觉一样啊。求助高人