| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 695 人关注过本帖
标题:高手请进asp过程中如何调用javascript
只看楼主 加入收藏
er124585
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-8-17
收藏
 问题点数:0 回复次数:2 
高手请进asp过程中如何调用javascript
sub ProductContent(intTitleLen)
       dim i,strTemp,ViewList
         i=1
         ViewList=3
        strTemp=""
        strtemp= strtemp & "<p>"
        strTemp= strTemp & "<TABLE align=center  BORDER=0 CELLSPACING=1 CELLPADDING=0>"
        strTemp= strTemp & "<tr>"
    do while not rsProduct.eof
     strTemp= strTemp & "<td width=160>"                
        strTemp= strTemp & "<table align=center width=160 border=0 cellspacing=2 cellpadding=0>"
                strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td colspan=2>"
              strTemp= strTemp &"<TABLE  border=0 cellPadding=0 cellSpacing=5>"
   strTemp= strTemp &"<TR>"
   strTemp= strTemp &"<TD align=middle > <TABLE align=center border=0 cellPadding=0 cellSpacing=0>"      
   strTemp= strTemp &"<TR>"
   strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0ltop.gif' width=10></TD>"
   strTemp= strTemp &"<TD background='Img/bg_01.gif' height=10></TD>"
   strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rtop.gif' width=10></TD>"
   strTemp= strTemp &"</TR>"
   strTemp= strTemp &"<TR> "
   strTemp= strTemp &"<TD background='Img/bg_03.gif' width=10>&nbsp;</TD>"
   strTemp= strTemp & "<td width=130 height=100>"&"<div align=center>"
   strTemp= strTemp & "<a href='" & rsProduct("DefaultPicUrl") & "' target=_blank>" & "<img src=" & rsProduct("DefaultPicUrl") & " width='130' height='100' border='0' onload='javascript:DrawImage(this);'>" & "</a><br></div>"  
   strTemp= strTemp & "</td>"
   strTemp= strTemp &"<TD background='Img/bg_04.gif' width=10>&nbsp;</TD>"
   strTemp= strTemp &"</TR>"
   strTemp= strTemp &"<TR>"
   strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0lbottom.gif' width=10></TD>"
   strTemp= strTemp &"<TD background=Img/bg_02.gif height=10></TD>"
   strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rbottom.gif' width=10></TD>"
   strTemp= strTemp &"</TR>"         
   strTemp= strTemp &"</TABLE></TD>"
   strTemp= strTemp &"</TR>"  
   strTemp= strTemp &"</TABLE>"
                strTemp= strTemp & "</a></div></td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td align=right >"
               ' strTemp= strTemp & "名称:</td>"
                strTemp= strTemp & "<td width=80% >"
                strTemp= strTemp & "<a href='" & rsProduct("DefaultPicUrl") & "' target=_blank>" & rsProduct("Title") & ""
                strTemp= strTemp & "</a></td>"
                
                'strTemp= strTemp & "</tr><tr>"
                'strTemp= strTemp & "<td align=right >"
               ' strTemp= strTemp & "编号:</td>"
               ' strTemp= strTemp & "<td>"
                'strTemp= strTemp & rsProduct("Product_Id") & ""
              '  strTemp= strTemp & "</a></td>"                      
               
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td colspan=2>"
                strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
                strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & "<div align=center></div></td>"            
               strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td width=50% height=12>"
                strTemp= strTemp & "<div align=center></div></td>"
               
                'strTemp= strTemp & "<td width=50% height=12>"
                'strTemp= strTemp & "<div align=center><input name='Product_Id' type='checkbox'    id='Product_Id' value="&cstr(rsProduct("Product_Id"))&"> 选取"
             '   strTemp= strTemp & "</div></td>"
                
                strTemp= strTemp & "</tr>"
                
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"
                strTemp= strTemp & "</td>"
                strTemp= strTemp & "</tr><tr>"
              ' strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"        
        if i mod ViewList =0 then
           strTemp= strTemp & "</td></tr>"
        end if
           rsProduct.MoveNext      
        i=i+1
        if i>MaxPerPage then exit do            
    loop
        strtemp= strtemp & "</tr></table>"
        response.write strTemp  
end sub  
 

("DefaultPicUrl") & "' target=_blank>" & "<img src=" & rsProduct("DefaultPicUrl") & " width='130' height='100' border='0' onload='javascript:DrawImage(this);'>" & "</a><br></div>"  


<a href='" & rsProduct("DefaultPicUrl") & "' target=_blank>是打开一个新的浏览器窗口,但只是一般的,如果改为嵌入javascript的window.open()函数的话,可以达到那种效果,但就是我加入这个函数的时候老出错或起不到作用
搜索更多相关主题的帖子: javascript asp 
2008-09-24 17:50
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
2008-09-24 22:39
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
请了解有些客户端的JavaScript效果跟ASP的特性是完全无关的。完全是两回事
2008-09-24 22:40
快速回复:高手请进asp过程中如何调用javascript
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012569 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved