<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
<!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 runat="server">
<title>无标题页</title>
<script src="Js/Function.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<script>var CurrentSkinName = 'Default';var DefaultGoodsPic = '/Default_Pic_Small.gif';function goodsImageError(object)
{
var o = null;
if(window.event != null)o = window.event;
if(o != null)
{
o.srcElement.onerror = null;
o.srcElement.style.visibility = "visible";
o.srcElement.src = "image/" + CurrentSkinName + DefaultGoodsPic;
o.srcElement.onerror = null;
}
}
function setBigImageNewSize(object)
{
if(window.event == null)return;
var src = window.event.srcElement;
var maxWidth = src.attributes["MaxWidth"];
src.style.visibility = "visible";
if(maxWidth != null)
{
maxWidth = parseInt(maxWidth.value);
//alert(maxWidth);
if(src.width > maxWidth || src.height > maxWidth)
{
var s = new Size(src.width,src.height);
s = GetSizeForMax(s,maxWidth);
if(s.Width != 0 && s.Height != 0)
{
src.width = s.Width;
src.height = s.Height;
}
//src.width = 100;
//src.height = 100;
src.onerror = goodsImageError;
if(!src.loaded)
{
src.loaded = true;
}
else
{
src.onload = null;
}
src.src = src.src;
}
//alert(src.width);
}
}</script>
<SPAN>
<SCRIPT type="text/javascript">
imgUrl1="image/pic/pic01.jpg";
imgtext1="极速网店系统-专业网上开店系统"
imgLink1=escape("http://www.jisushop.com/");
imgUrl2="image/pic/pic02.jpg";
imgtext2="极速网店系统-专业网上开店系统"
imgLink2=escape("http://www.jisushop.com/");
imgUrl3="image/pic/pic04.jpg";
imgtext3="极速网店系统-专业网上开店系统"
imgLink3=escape("http://www.jisushop.com/");
var focus_width=563
var focus_height=156
var text_height=0
var swf_height = focus_height+text_height
var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3
var links=imgLink1+"|"+imgLink2+"|"+imgLink3
var texts=imgtext1+"|"+imgtext2+"|"+imgtext3
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="image/pic/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#fff">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="image/pic/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ccc" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
</SCRIPT>
</SPAN>
</div>
</form>
</body>
</html>
下面这个是JS函数:
function InputNum(obj)
{
if(event.keyCode >= 48 && event.keyCode <=57 ||event.keyCode ==8 || event.keyCode >= 96 && event.keyCode <=105)
{
return true;
}
return false;
}
function checkKey(key,str,em)
{
var o = key;
if(o.value == "" || o.value == null)
{
if(str != null)
alert(str);
else
alert("请输入关键字!");
return false;
}
else if(isNull(o.value))
{
if(em != null)
alert(em);
else
alert("关键字不能为空!");
return false;
}
else
{
return true;
}
}
function isNull(str)
{
var len = '';
for(i = 0; i < str.length; i++)
{
len = len + ' ';
}
return (len == str);
}