看看以前的同事写的代码

2013-07-05 14:18:18 +08:00
 older
<!--#include file="header.asp" -->
<div id="content">
<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=1 direction=up width=1 height=1 delay="1">
<div class="content-top"><img src="images/content-top.jpg" width="938" height="4" /></div>
<div class="content-zhong">
<div class="con-left">
<p class="font">About us</p>
<p class="neirong"><%=left(rs4("eabout"),600)%>...</p>
<p class="font">Products Categories</p>
<div style="margin-top:10px; padding-left:20px;">
<% set rs=server.CreateObject("adodb.recordset")
sql="select * from product where audit=1 order by id desc"
rs.open sql,conn,1,3%>
<%
do while not rs.eof
%>
<p style="width:106px; float:left; padding:5px; line-height:34px; height:130px; background:url(images/cp-bg.jpg) no-repeat;">
<span><a href="products.asp?sort_id=<%=rs("sort_id")%>"><img src="../pic/<%=rs("pic")%>" width="96" height="88" border="0"/></a></span><br />
<a style="color:#000;" href="products.asp?sort_id=<%=rs("sort_id")%>"><%=rs("ecpmc")%></a></p>
<%
rs.movenext
loop
rs.close
%>
</div>

</div>
<div class="con-right">
<!--#include file="right.asp" -->
</div>

<div class="content-buttom"><img src="images/content-buttom.jpg" width="938" height="4" /></div>
</div>
<!--#include file="footer.asp" -->
</body>
</html>
5826 次点击
所在节点    程序员
48 条回复
CoX
2013-07-05 15:41:47 +08:00
@yibin001 呵呵,很久以前帖成功过,现在又不记得了
subpo
2013-07-05 15:43:49 +08:00
Hyperion
2013-07-05 15:44:26 +08:00
看到"MARQUEE", 我就颤抖了... 这是啥年代的标签了...
yibin001
2013-07-05 15:44:49 +08:00
@CoX
是不是因为这个gist是私有的原因?我看文件名是一个hash值啊
refresh
2013-07-05 15:53:59 +08:00
@CoX 牛逼的代码
binjoo
2013-07-05 16:20:32 +08:00
凑合着用吧。
Sunyanzi
2013-07-05 16:31:39 +08:00
顶楼的 ASP 没有任何问题 ..? 换言之 ... 如果不这么写还能怎么写 ..?

那段 js 虽然难看点 ... 但感觉问题也不大 ...

能用 ... 效率不低 ... 且重构复杂 ... 只是无法维护罢了 ...
manoon
2013-07-05 16:50:32 +08:00
很有我的风格,一直这样写,从未被超越
现在不知道,反正对于ASP来说,以前。
很少会有MVC相关的概念,也没有一些简单易用类似于SMARTY之类的框架。
workaholic
2013-07-05 17:00:29 +08:00
我和我的小伙伴们都惊呆了
CoX
2013-07-05 17:32:14 +08:00
@yibin001 不是私有gist,可以直接查看的啊

@refresh 我估计我们公司这个官网是找某个个人做的,具体做了多久不知道了。我贴的那堆代码就是为了实现在一个表里做个简单查询。另外,整个数据库的表设计的是一塌糊涂。公司想让改版,我就建议重写。
sarices
2013-07-05 17:33:27 +08:00
asp不是这样写的,我当年是用jscript写asp,然后用xsl做模板 ,封装好类库,尽量用MVC结构实现,这样后面接手的根据文档能很方便修改。
raptor
2013-07-05 17:58:01 +08:00
不错了。我以前同事写过用拼音首字母缩写做变量名的…比如:时间是SJ…
icoder
2013-07-05 18:00:15 +08:00
代码咋样无所谓的,运行没毛病就行了
hellmash
2013-07-05 18:10:55 +08:00
看到这段代码就想起00年用asp做基于exchange5.5的公文流转,那时候多羡慕那些基于LotusNotes/Domino做的公文流转
VYSE
2013-07-05 18:16:47 +08:00
asp页面这样再正常不过,嘲笑早期开发者的工作想想以后会不会有人嘲笑现在人的工作
qingfeng
2013-07-05 18:50:58 +08:00
quick and dirty风格,我喜欢!
013231
2013-07-05 19:01:45 +08:00
@CoX V2EX只能貼Public Gist, 你那個是Secret Gist. 創建一個Gist時底下有兩個按鈕可選的.
haichong520
2013-07-05 20:13:41 +08:00
Beautiful Code
holy_sin
2013-07-05 20:24:18 +08:00
好恶心啊
wtser
2013-07-05 20:42:41 +08:00
强迫症来了,想重构的冲动!!!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/74855

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX