+++++++++++++++++第一種情況:
1.後台方法:
protected string CsharpVoid(string strCC)
{
return strCC;
}
2.Javascript 調用
<script language="Javascript">
var s = "<%=CsharpVoid("www.esoutong.com")%>";
document.write(s);
</script>
+++++++++++++++++第二種情況:
1.後代碼:
protected void CsharpVoid()
{
string strCC = "www.esoutong.com";
Response.Write(strCC);
}
2.調用方法:CsharpVoid()
<script language="Javascript">
document.write("<%CsharpVoid();%>");
</script>