Q
qaz1znz
Unregistered / Unconfirmed
GUEST, unregistred user!
原文件(含javascript语句)如下:
<%@LANGUAGE="JAVASCRIPT" 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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="关键字" />
<meta name="description" content="说明" />
<title>无标题文档 </title>
</head>
</head>
<body>
<ul>
<%
var pid=new Array();
itj=3
pid[1]=1;
pid[2]=2;
pid[3]=3;
if (itj!=0)
for (i=1;i <=itj;i++)
{
Response.Write(' <li>'+pid+' </li>');
}
%>
</ul>
</body>
</html>
怎么才能写一个函数送入这段文本后,得到如下的结果文本:
<!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=gb2312" />
<meta name="keywords" content="关键字" />
<meta name="description" content="说明" />
<title>无标题文档 </title>
</head>
</head>
<body>
<ul>
<li>1 </li> <li>2 </li> <li>3 </li>
</ul>
</body>
</html>
<%@LANGUAGE="JAVASCRIPT" 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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="关键字" />
<meta name="description" content="说明" />
<title>无标题文档 </title>
</head>
</head>
<body>
<ul>
<%
var pid=new Array();
itj=3
pid[1]=1;
pid[2]=2;
pid[3]=3;
if (itj!=0)
for (i=1;i <=itj;i++)
{
Response.Write(' <li>'+pid+' </li>');
}
%>
</ul>
</body>
</html>
怎么才能写一个函数送入这段文本后,得到如下的结果文本:
<!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=gb2312" />
<meta name="keywords" content="关键字" />
<meta name="description" content="说明" />
<title>无标题文档 </title>
</head>
</head>
<body>
<ul>
<li>1 </li> <li>2 </li> <li>3 </li>
</ul>
</body>
</html>