<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="log.aspx.cs" Inherits="JINDIsoft.log" %>
<!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">
<script language="c#" runat="server">
void loglog(object sender, EventArgs e)
{
string Path = @"D:\log\log.txt";
if (!System.IO.File.Exists(Path))
{
System.IO.FileStream f = System.IO.File.Create(Path);
f.Close();
f.Dispose();
}
System.IO.StreamWriter f2 = new System.IO.StreamWriter(Path, true,
System.Text.Encoding.GetEncoding("gb2312"));
f2.WriteLine(Request["st"].ToString());
f2.Close();
f2.Dispose();
}
</script>
onclick="loglog" 后面的控制元件代碼這里出的問題
Uncaught ReferenceError: loglog is not defined
未定義??
是不是沒讀到上面的代碼啊?
我寫在一個aspx里的,dll沒法寫。
public加上也不行,加上static還是不行
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/274957.html
標籤:C#
