给一变量赋值为一字符串。
点击空链接时,文本框显示变量的值,语句怎样写?谢谢!
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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">
<%bz="显示这个字符串"%>
<head>
<script language=JavaScript >
function LinkClick()
{
document.Form1.Textfield.value=bz;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<table width="200" border="1">
<tr>
<th scope="col"><a href="#" onclick=LinkClick();>空链</a></th>
</tr>
</table>
<p> </p>
<form id="form1" name="form1" method="post" >
<label>
<textarea name="textfield"></textarea>
</label>
<label></label>
</form>
<p> </p>
</body>
</html>
不行啊,请帮忙改一下。
<head>
<script language=JavaScript >
function LinkClick(){
document.Form1.Textfield.value=bz;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<table width="200" border="1">
<tr>
<th scope="col">
<a href="#" onclick=LinkClick();>空链</a>
</th>
</tr>
</table>
<p> </p>
<form id="form1" name="form1" method="post" >
<label> <textarea name="textfield"></textarea> </label>
<label></label></form>
<p> </p>
</body>
</html>
红字的变量是哪里的?