部分代码:
search-result.aspx
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/brochure.Master" CodeBehind="search-result.aspx.vb" Inherits="LetByNet2.search_result" %> <%@ Import Namespace="GlobalWebBLL.BLLDB" %> <%@ Import Namespace="GlobalWebBLL.BLLDB.Utility" %> <%@ Import Namespace="GlobalWebUTILS" %> <%@ Register TagPrefix="cc" TagName="skyscraper" Src="/Skyscraper.ascx" %> <asp:Content ID="Content1" ContentPlaceHolderID="mainContent" runat="server"> <mce:script src="/Scripts/Start.js" mce_src="Scripts/Start.js" type="text/javascript"></mce:script> <mce:script src="/Scripts/Extended/ExtendedControls.js" mce_src="Scripts/Extended/ExtendedControls.js" type="text/javascript"></mce:script> <mce:script type="text/javascript"><!-- Sys.require([Sys.components.autoComplete, Sys.components.dataContext], function() { Sys.create.autoComplete("#ctl00_mainContent_postcode", { servicePath: "/datasource.svc", serviceMethod: "GetPostcodeSuggestions", minimumPrefixLength: 1, firstRowSelected: true, completionInterval: 200, contextKey: '<%=QueryCountryID()%>' } ); }); var openWin = function(url, w, h) { window.open(url, 'gwwin', 'width=' + w + ',height=' + h + ',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes'); } // --></mce:script> <mce:script type="text/javascript"><!-- var pics = new Array(); var result = new Array(); var rand = new Array(); rand[0] = 0; rand[1] = 1; rand[2] = 2; rand[3] = 3; rand[4] = 4; rand[5] = 5; rand[6] = 6; rand[7] = 7; rand[8] = 8; rand[9] = 9; window.onload = function getnewarray() { if (rand.length == 0) { return; } var index = getrandom(rand.length) - 1; var length = result.length; result[length] = rand[index]; rand.splice(index, 1); getnewarray(); var a = result[0]; var b = result[1]; var c = result[2]; var d = result[3]; var e = result[4]; var f = result[5]; var g = result[6]; var h = result[7]; var i = result[8]; var j = result[9]; document.getElementById("div0").innerHTML = document.getElementById(a).innerHTML; document.getElementById("div1").innerHTML = document.getElementById(b).innerHTML; document.getElementById("div2").innerHTML = document.getElementById(c).innerHTML; document.getElementById("div3").innerHTML = document.getElementById(d).innerHTML; document.getElementById("div4").innerHTML = document.getElementById(e).innerHTML; document.getElementById("div5").innerHTML = document.getElementById(f).innerHTML; document.getElementById("div6").innerHTML = document.getElementById(g).innerHTML; document.getElementById("div7").innerHTML = document.getElementById(h).innerHTML; document.getElementById("div8").innerHTML = document.getElementById(i).innerHTML; document.getElementById("div9").innerHTML = document.getElementById(j).innerHTML; } function getrandom(n) { var i = Math.floor(Math.random() * n + 1); return i; } // --></mce:script> <mce:style type="text/css"><!-- .local-ads { background: white url(/images/local-middle.png) repeat-y; width: 139px; margin-bottom: 5px; } .local-ads span.top-ads { background: white url(/images/local-top.png) repeat-y; width: 139px; height: 4px; display: block; } .local-ads span.bottom-ads { background: white url(/images/local-bottom.png) repeat-y; width: 139px; height: 4px; display: block; } .div { display:none; } --></mce:style><style type="text/css" mce_bogus="1"> .local-ads { background: white url(/images/local-middle.png) repeat-y; width: 139px; margin-bottom: 5px; } .local-ads span.top-ads { background: white url(/images/local-top.png) repeat-y; width: 139px; height: 4px; display: block; } .local-ads span.bottom-ads { background: white url(/images/local-bottom.png) repeat-y; width: 139px; height: 4px; display: block; } .div { display:none; } </style> <div id="right-side"> <h3 style="width: 139px; height: 20px; background-image: url(/images/tab-services.png); overflow: hidden; color: White; margin: 5px 0; padding: 6px 0 0 0;"> Local Services</h3> <asp:Panel ID="ams" runat="server"> <div id="div0" class="local-ads"></div> <div id="div1" class="local-ads"></div> <div id="div2" class="local-ads"></div> <div id="div3" class="local-ads"></div> <div id="div4" class="local-ads"></div> <div id="div5" class="local-ads"></div> <div id="div6" class="local-ads"></div> <div id="div7" class="local-ads"></div> <div id="div8" class="local-ads"></div> <div id="div9" class="local-ads"></div> <div id="0" class="div"> <span class="top-ads"></span> <asp:Literal ID="position0" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="1" class="div"> <span class="top-ads"></span> <asp:Literal ID="position1" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="2" class="div"> <span class="top-ads"></span> <asp:Literal ID="position2" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="3" class="div"> <span class="top-ads"></span> <asp:Literal ID="position3" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="4" class="div"> <span class="top-ads"></span> <asp:Literal ID="position4" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="5" class="div"> <span class="top-ads"></span> <asp:Literal ID="position5" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="6" class="div"> <span class="top-ads"></span> <asp:Literal ID="position6" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="7" class="div"> <span class="top-ads"></span> <asp:Literal ID="position7" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="8" class="div"> <span class="top-ads"></span> <asp:Literal ID="position8" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> <div id="9" class="div"> <span class="top-ads"></span> <asp:Literal ID="position9" runat="server"></asp:Literal><span class="bottom-ads"> </span> </div> </asp:Panel>