对于asp语句和html标记的混排,总觉得没有单纯的asp代码容易看,大家有什么好经验。
whose 2004-01-02 04:11:54 例如下面的代码。
大家是将asp语句和html标记各自分开来做吗,这样写怎么合起来。
还是先用网页工具将要表现的网页做出来,再在需要的地方插入asp代码,但这样,常常不知道语句写到哪了。
还有要将asp代码分割成一段段<% %>,怎么样分割更可读。
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<title>欢迎光临</title>
</head>
<%action=request("action")%>
<%if action="addnew" then%> 例如:这两名句怎么不合在一起。而下面的html 又显得不好读了
<table width="600" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC"> 这里又有html,asp代码就显得不好读了
<form action="admin.asp?action=addnewpost" method="post">
<tr bgcolor="#f1f1f1">