目前共有2篇帖子。 字體大小:較小 - 100% (默認)▼  內容轉換:不轉換▼
 
點擊 回復
198 1
设置搜索选项
一派護法 十九級
1樓 發表于:2010-9-1 22:24
设置搜索选项
从不同的源寻找帮助和信息。要更改您的搜索范围,从下面的列表中选择一个或多个提供者。 每提供者最多返回  个结果。  启用搜索突出显示。  建议的主题 显示可能性最大的结果。搜索将您键入的短语与文档作者为该文档定义为“关键字”的短语相匹配。 选择此选项使您能够将搜索限制在当前主题的特定帮助类别中。  全文本搜索匹配 显示包含您键入的文本的文档。  只搜索标题  匹配类似的词  Microsoft Knowledge Base 显示来自 Microsoft Knowledge Base 网站的相关主题或文章。Knowledge Base 是一个技术支持信息源和 Microsoft 产品的自支持工具。  只搜索标题 搜索产品或标题: 所有 Windows 产品可访问性Active Server Page聊天COM+设备驱动程序DirectX (家庭用户)游戏使您的 Windows 发挥最大功效硬件产品家庭公布索引服务器Internet ExplorerInternet Explorer 管理工具包Internet 信息服务Internet 邮件和新闻键盘MDAC邮件队列Microsoft 管理控制台MS-DOSNetMeeting网络ODBCOutlook Express定位设备(鼠标)正在打印设置和安装声音终端服务器疑难解答向导Windows 2000Windows 2000 开发者Windows 2000 家庭用户Windows CE供手持式 PC 使用的 Windows CE供掌上 PC 使用的 Windows CEWindows Media PlayerWindows Media ServicesWindows Update 搜索: 所有这些字这些字之一准确的短语逻辑短语 var L_Required_Text = "要求"; var L_NumUnsignedError_Text = "值必须是一个大于 0 的有效整数。"; var L_NumIntError_Text = "值必须是一个有效整数。"; var L_NumFloatError_Text = "值必须是一个有效的浮点数。"; var L_DateError_Text = "值必须是一个有效的日期。"; var L_NoEngine_Text = "您已经取消选择所有可用的搜索提供程序。您必须至少选择一个搜索提供程序来搜索帮助和支持中心。"; var g_NAVBAR = pchealth.UI_NavBar.content.parentWindow; // Init SEMgr var g_aParamValue = []; if(g_NAVBAR.GetWrapperVar( "SEMgrInit" ) != "true") { LoadWrapperParams( g_NAVBAR.GetSearchEngineManager() ); g_NAVBAR.SetWrapperVar( "SEMgrInit", "true" ); } allSearchHighlight.checked = g_NAVBAR.g_SearchHighlight; function SetParam(itemid, value) { // Extract the id and parameter name var re = new RegExp("___"); var arr = re.exec(itemid); var wrapperid = RegExp.leftContext; var paramname = RegExp.rightContext; // Locate the wrapper var oWrapper = g_NAVBAR.FindWrapper(wrapperid); // Set the value oWrapper.AddParam(paramname, value); // Save the parameter into the registry SaveWrapperParams(wrapperid, paramname, value); } function NumUnsignedIntChange() { // Check the value of the input var value = parseInt( event.srcElement.value ); var value2 = parseFloat(event.srcElement.value); // Check to see if it is positive and if it is an integer if(isNaN( event.srcElement.value ) || (value < 0) || (value != value2)) // check if integer { pchealth.MessageBox( L_NumUnsignedError_Text, "OK" ); event.srcElement.value = pchealth.TextHelpers.QuoteEscape( g_aParamValue[event.srcElement.id], "'" ); return; } SetParam(event.srcElement.id, value); } function NumSignedIntChange() { // Check the value of the input var value = parseInt( event.srcElement.value ); var value2 = parseFloat(event.srcElement.value); // Check to see if it is an integer if(isNaN( event.srcElement.value ) || (value != value2)) { pchealth.MessageBox( L_NumIntError_Text, "OK" ); event.srcElement.value = pchealth.TextHelpers.QuoteEscape( g_aParamValue[event.srcElement.id], "'" ); return; } SetParam(event.srcElement.id, value); } function NumFloatChange() { // Check to see if it is a number if(isNaN( event.srcElement.value )) { pchealth.MessageBox( L_NumFloatError_Text, "OK" ); event.srcElement.value = pchealth.TextHelpers.QuoteEscape( g_aParamValue[event.srcElement.id], "'" ); return; } SetParam(event.srcElement.id, value); } function DateChange() { var temp = Date.parse(event.srcElement.value); if(isNaN( temp )) { pchealth.MessageBox( L_DateError_Text, "OK" ); event.srcElement.value = pchealth.TextHelpers.QuoteEscape( g_aParamValue[event.srcElement.id], "'" ); return; } SetParam(event.srcElement.id, event.srcElement.value); } function TextChange() { SetParam(event.srcElement.id, event.srcElement.value); } function ListChange() { var oOptions = event.srcElement.options(event.srcElement.selectedIndex); SetParam(event.srcElement.id, oOptions.value); } function ClickChange() { try { if(event.srcElement.checked) { SetParam(event.srcElement.id, true); } else { SetParam(event.srcElement.id, false); } } catch(e) {;} } function GenerateList(oWrapper, strXML, strParamName, strDisplay, strDisplay2, strPrevValue) { try { // Load the xml file var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); xmldoc.async = false; xmldoc.loadXML(strXML); var strHTML = ""; // Generate each item var ElemList = xmldoc.getElementsByTagName("PARAM_VALUE"); for (var i=0; i < ElemList.length; i++) { var strItemValue = ElemList.item(i).getAttribute("VALUE"); var strDisplay = pchealth.TextHelpers.HTMLEscape(ElemList.item(i).getElementsByTagName("DISPLAYSTRING").item(0).text); var strDefault = ElemList.item(i).getAttribute("DEFAULT"); if(strDefault == null) strDefault = ""; strItemValue = pchealth.TextHelpers.HTMLEscape( strItemValue ); // Restore the previous value if ((!strPrevValue) || (strPrevValue == "")) { // Check if default value if(strDefault.toLowerCase() == "true") { strHTML += "" + strDisplay; // set the default value so that the search wrapper gets this value oWrapper.AddParam( strParamName, strItemValue ); } else { strHTML += "" + strDisplay; } } else { if (pchealth.TextHelpers.HTMLEscape( strPrevValue ) == strItemValue) { strHTML += "" + strDisplay; } else { strHTML += "" + strDisplay; } } } strHTML += ""; return strHTML; } catch(e) { } return ""; } function DisplayParam(oWrapper, Type, strDisplay, strParamName, bReq, bstrData) { var strHTML = ""; var strReq = ""; var value = null; var value2; var strUIType = ""; var strValue = ""; var strResName = pchealth.TextHelpers.HTMLEscape( oWrapper.ID + "___" + strParamName ); var strParamHTML= ""; var strChecked = ""; var strDisplay2 = pchealth.TextHelpers.HTMLEscape( strDisplay ); strDisplay = pchealth.TextHelpers.HTMLEscape( strDisplay ); // If it is not required, then perform colspan if (bReq == false) strHTML += ""; else strHTML += ""; // Get the value stored before try { value = oWrapper.GetParam(strParamName); } catch(e) { // ignore } // Decide on the UI if(Type == pchealth.PARAM_R4 || // float Type == pchealth.PARAM_R8 ) // double { if(value == null) value = 0; value2 = pchealth.TextHelpers.HTMLEscape( value ); strParamHTML = ''; g_aParamValue[strResName] = value; } if(Type == pchealth.PARAM_UI1 || // Byte Type == pchealth.PARAM_I2 || // Short Type == pchealth.PARAM_I4 || // long Type == pchealth.PARAM_INT ) // int { if(value == null) value = 0; value2 = pchealth.TextHelpers.HTMLEscape( value ); strParamHTML = ''; g_aParamValue[strResName] = value; } if(Type == pchealth.PARAM_UI2 || // unsigned short Type == pchealth.PARAM_UI4 || // unsigned long Type == pchealth.PARAM_UINT ) // unsigned int { if(value == null) value = 0; value2 = pchealth.TextHelpers.HTMLEscape( value ); strParamHTML = ''; g_aParamValue[strResName] = value; } if(Type == pchealth.PARAM_DATE) { if(value == null) value = ""; value2 = pchealth.TextHelpers.HTMLEscape( value ); strParamHTML = ''; g_aParamValue[strResName] = value; } if(Type == pchealth.PARAM_BSTR) // BSTR { if(value == null) value = ""; value2 = pchealth.TextHelpers.HTMLEscape( value ); strParamHTML = ''; g_aParamValue[strResName] = value; } if(Type == pchealth.PARAM_I1) // char { if(value == null) value = ""; value2 = pchealth.TextHelpers.HTMLEscape( value ); strParamHTML = ''; g_aParamValue[strResName] = value; } if(Type == pchealth.PARAM_BOOL) // VARIANT_BOOL { if(value == null) value = false; if(value == true) strChecked = "CHECKED"; strHTML += '" + strDisplay + ""; strHTML += strParamHTML; strHTML += ""; } else { strHTML += strDisplay + ""; strHTML += strParamHTML + ""; strHTML += "" + L_Required_Text + ""; } } // End Row strHTML += ""; return strHTML; } function GenWrapperParams( oSearchEng ) { var strResultHTML = ""; var bFTSPer = false; // Bug 174314 : Do not allow Search in Titles only option for personal SKUs if(oSearchEng.ID == g_NAVBAR.ID_FTS) { if(pchealth.UserSettings.CurrentSKU.SKU.match( /^Personal_/ )) bFTSPer = true; } // Loop through all the variables for(var v = new Enumerator(oSearchEng.Param()); !v.atEnd(); v.moveNext()) { ParamItem = v.item(); // If parameter is not visible, skip if(ParamItem.Visible == true) { // Check to see if the value has changed strResultHTML += DisplayParam( oSearchEng, ParamItem.Type, ParamItem.Display, ParamItem.Name, ParamItem.Required, ParamItem.Data ); } } return strResultHTML; } function NumResultsChange() { // Check the value of the input var value = parseInt( event.srcElement.value ); var value2 = parseFloat(event.srcElement.value); // Check to see if it is an integer if(isNaN( event.srcElement.value ) || (value != value2) || value <= 0) { pchealth.MessageBox( L_NumUnsignedError_Text, "OK" ); try { event.srcElement.value = g_NAVBAR.GetSearchEngineManager().NumResult; } catch(e) { ; } return; } try { g_NAVBAR.GetSearchEngineManager().NumResult = value; } catch(e) { return; } // Save the parameter into the registry SaveWrapperParams("", "NumResults", value); } function SearchHighlightChange() { try { g_NAVBAR.g_SearchHighlight = event.srcElement.checked; SaveWrapperParams( "", "SearchHighlight", g_NAVBAR.g_SearchHighlight ); } catch(e) {;} } function ClickEnable() { // Extract the id and parameter name var re = new RegExp("___"); var arr = re.exec(event.srcElement.id); var wrapperid = RegExp.rightContext; var semgr = g_NAVBAR.GetSearchEngineManager(); var bEnabled = false; // Locate the wrapper var oWrapper = g_NAVBAR.FindWrapper(wrapperid); // Set the value oWrapper.Enabled = event.srcElement.checked; // Check if all wrappers have been disabled for(var e = new Enumerator( semgr.EnumEngine()); !e.atEnd(); e.moveNext()) { var oSearchEng = e.item(); if (oSearchEng.Enabled) { bEnabled = true; break; } } // Issue warning if all wrappers are disabled if (bEnabled == false) { pchealth.MessageBox( L_NoEngine_Text, "OK" ); } // Save the parameter into the registry SaveWrapperParams(oWrapper.ID, "Enabled", event.srcElement.checked); // Change the param state ParamState(oWrapper, event.srcElement.checked); if (oWrapper.ID == g_NAVBAR.ID_KEYWORD) pchealth.WEB_Context.document.parentWindow.EnableSubsite(event.srcElement.checked); } function ParamState(oWrapper, bEnabled) { // Loop through all the variables for(var v = new Enumerator(oWrapper.Param()); !v.atEnd(); v.moveNext()) { var ParamItem = v.item(); var oParamDiv = idSearchWrappers.all.item(oWrapper.ID + "___" + ParamItem.Name); var oTextDIV = idSearchWrappers.all.item("text" + oWrapper.ID + "___" + ParamItem.Name); var oDescDIV = idSearchWrappers.all.item("desc" + oWrapper.ID); if(oParamDiv) oParamDiv.disabled = bEnabled ? false : true; if(oTextDIV ) oTextDIV.className = bEnabled ? "AdvSearch-Result sys-font-body sys-color-body" : "AdvSearch-Result sys-font-body sys-font-body-gray"; if(oDescDIV ) oDescDIV.className = bEnabled ? "AdvSearch-WrapperDesc sys-font-body sys-color-body" : "AdvSearch-WrapperDesc sys-font-body sys-font-body-gray"; } } function PopulateVariables() { var strResultHTML = ""; var semgr = g_NAVBAR.GetSearchEngineManager(); // Display general parameters allMaxResults.value = semgr.NumResult; // Max results from search engine // Loop thru all engines for(var e = new Enumerator( semgr.EnumEngine()); !e.atEnd(); e.moveNext()) { var oSearchEng = e.item(); // Add enable input var strEnable = (oSearchEng.Enabled ? "CHECKED" : ""); strResultHTML += ""; strResultHTML += '
一派護法 十九級
2樓 發表于:2010-9-1 22:24
ASP is SB!

回復帖子

內容:
抱歉,本吧禁止發帖
抱歉,本吧禁止發帖
用戶名: 您目前是匿名發表
(快捷鍵:Ctrl+Enter)
 

本帖信息

點擊數:198 回複數:1
評論數: ?
作者:巨大八爪鱼
最後回復:巨大八爪鱼
最後回復時間:2010-9-1 22:24
 
©2010-2024 Arslanbar Ver2.0
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。