Stack overflow at line: 0 http://www.tek-tips.com/viewthread.cfm?qid=979740&page=5The stack is a region of memory on which local automatic variables are created and function arguments are passed. The implementation allocates a default stack size per process. On modern operating systems, a typical stack has at least 1 megabyte, which is sufficient for most purposes. Under anomalous conditions, the program exceeds its stack limit. This causes a stack overflow. The two most common causes for a stack overflow is an infinite recursion, as in: int f(){ g(); } int g() { f(); }f() calls g(), which in turn calls f() and so on. Eventually, the stack overflows. Another common cause for stack overflow is an attempt to create a large array on the stack, for example:
int main() { int n[10000000]; // array is too large int j =0; //j's address exceeds the stack's limits, error }If your program crashes due to a stack overflow, check for infinite recursion or too large local objects
因为js执行到onload的时候, 数据库访问还没结束 甚至还没开始
所以<%=rs_1("picture_name")%>是空的
所以...
<%if rs_1("picture_name")<>"" then%>
<form name="form" method="GET" action="buysend_detail.asp">
<img id="mainpic" src="../product_image/<%=rs_1("picture_name")%>" onload="check1('<%=rs_1("picture_name")%>')" border="1">
<%end if %>
http://www.tek-tips.com/viewthread.cfm?qid=979740&page=5The stack is a region of memory on which local automatic variables are created and function arguments are passed. The implementation allocates a default stack size per process. On modern operating systems, a typical stack has at least 1 megabyte, which is sufficient for most purposes. Under anomalous conditions, the program exceeds its stack limit. This causes a stack overflow. The two most common causes for a stack overflow is an infinite recursion, as in:
int f(){
g();
}
int g() {
f();
}f() calls g(), which in turn calls f() and so on. Eventually, the stack overflows. Another common cause for stack overflow is an attempt to create a large array on the stack, for example:
int main()
{
int n[10000000]; // array is too large
int j =0; //j's address exceeds the stack's limits, error
}If your program crashes due to a stack overflow, check for infinite recursion or too large local objects
这个语句会导致IE重新load新的图片,这样img的onload事件再次触发,接着再给mainpic.src赋值,又导致IE重新装载图片,又触发onload事件.....................这是一个无限循环,导致堆栈溢出,把check1函数放在<body>里边就可以了