动态网页ASP语言基础(7)
Javascript 基本结构和语法
与VBScript相同,也是写在 <% %> 之间。
用 var 声明变量,语句的末尾用“;”隔开。
以下为引用内容:
<%@LANGUAGE="JSCRIPT" CODEPAGE="65001"%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 实例演示 Javascript 基本结构和语法 </title>
</head>
<body>
<%
var a,b,c
a=10;
b=20;
c=30;
fx=a+b+c;
%>
<%
=fx
%>
</body>
</html>
本文链接:http://www.oversteper.com/wprogram/asp/819.html
相关文档:
1.如何用Asp判断你的网站的虚拟物理路径
答:使用Mappath方法
< p align="center" >< font size="4" face="Arial" >< b >
The Physical path to this virtual website is:
< /b >< /font >
< font color="#FF0000" size="6" face="Arial" >
< %= Server.MapPath("\")% >
......
先看看ASP.NET页面刷新的实现方法:
第一:
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二:
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.locatio ......
常用的脚本语言有 Javascript 和 VBscript 。
使用哪种语言需先设定。如上节代码中的<%@ LANGUAGE="JSCRIPT" ... %>。
如果没有指定,系统就会使用 IIS 程序指定的脚本语言。
VBscript 用法
VBscript 一般放在 <head> 与 </head> 内的 <% 和 %> 之间。
代 ......