AddFilter
Add user-defined filter to data setSyntax
D = AddFilter(D, expr)
Description
This is a method of mbcmodel.data.A filter is a constraint on the data set used to exclude some records. You define the filter using logical operators or a logical function on the existing variables.D is the mbcmodel.data object you want to filter.expr is an input string holding the expression that defines the filter.Examples
AddFilter(D, 'AFR < AFR_CALC + 10');
The effect of this filter is to keep all records where AFR < AFR_CALC +10.AddFilter(D, 'MyFilterFunction(AFR, RPM, TQ, SPK)');
The effect of this filter is to apply the function MyFilterFunction using the variables AFR, RPM, TQ, SPK.All filter functions receive an nx1 vector for each variable and must return an nx1 logical array out. In that array, true (or 1) indicates a record to keep, and false (or 0) indicates a record to discard

解决方案 »

  1.   

    document.addFilter()
    可用性
    Flash 8。用法
    document.addFilter( filterName )参数
    filterName 一个字符串,它指定要添加到"滤镜"列表并对所选对象启用的滤镜。可接受值为 "adjustColorFilter"、"bevelFilter"、"blurFilter"、"dropShadowFilter"、"glowFilter"、"gradientBevelFilter" 和 "gradientGlowFilter"。返回
    无。说明
    方法;将滤镜应用于所选对象,并将滤镜放置到"滤镜"列表的末尾。示例
    下面的示例将一个发亮滤镜应用于所选对象。fl.getDocumentDOM().addFilter("glowFilter");
      

  2.   

    我用FRONTPAGE的,后面提示的参数只有一个呀能不能给个JS下的例子?
      

  3.   

    function addfilter(selObj) { 
    if (selObj.options[selObj.selectedIndex].value==’alpha(’) { 
            filterparam.innerHTML=’Opacity <input id=alpha1 type=text value=80 size=3 onkeypress="filter_alpha()" onmouseover="this.focus();this.select()"> - <input id=alpha2 type=text value=0 size=3 onkeypress="filter_alpha()" onmouseover="this.focus();this.select()"> Style <input id=alpha3 type=text value=2 size=1 onkeypress="filter_alpha()" onmouseover="this.focus();this.select()">’; 
            sample.style.filter=’alpha(’+’opacity=’+alpha1.value+’,finishopacity=’+alpha2.value+’,style=’+alpha3.value+’)’; 
            } 
    if (selObj.options[selObj.selectedIndex].value==’blur(’) { 
            filterparam.innerHTML=’Direction <input id=blur1 type=text value=45 size=3 onkeypress="filter_blur()" onmouseover="this.focus();this.select()"> Strength <input id=blur2 type=text value=5 size=3 onkeypress="filter_blur()" onmouseover="this.focus();this.select()">’; 
            sample.style.filter=’blur(’+’add=0,direction=’+blur1.value+’,strength=’+blur2.value+’)’; 
            } 
    if (selObj.options[selObj.selectedIndex].value==’light(’) { 
            filterparam.innerHTML=’RGB <input id=light1 type=text value=255 size=2 onkeypress="filter_light()" onmouseover="this.focus();this.select()"> <input id=light2 type=text value=0 size=2 onkeypress="filter_light()" onmouseover="this.focus();this.select()"> <input id=light3 type=text value=0 size=2 onkeypress="filter_light()" onmouseover="this.focus();this.select()"> Strength <input id=light4 type=text value=20 size=3 onkeypress="filter_light()" onmouseover="this.focus();this.select()">’; 
            sample.style.filter=’light()’; 
            sample.filters[0].addCone(0,0,1,sample.offsetWidth,sample.offsetHeight,light1.value,light2.value,light3.value,light4.value,90); 
            } 
    if (selObj.options[selObj.selectedIndex].value==’wave(’) { 
            filterparam.innerHTML=’Phase <input id=wave1 type=text value=4 size=2 onkeypress="filter_wave()" onmouseover="this.focus();this.select()"> Freq <input id=wave2 type=text value=5 size=2 onkeypress="filter_wave()" onmouseover="this.focus();this.select()"> Strength <input id=wave3 type=text value=2 size=3 onkeypress="filter_wave()" onmouseover="this.focus();this.select()">’; 
            sample.style.filter=’wave(Add=0, Phase=’+wave1.value+’,Freq=’+wave2.value+’,LightStrength="5",Strength=’+wave3.value+’)’; 
            } 
    if (selObj.options[selObj.selectedIndex].value==’fliph(’ || selObj.options[selObj.selectedIndex].value==’flipv(’ || selObj.options[selObj.selectedIndex].value==’invert(’ || selObj.options[selObj.selectedIndex].value==’gray(’ || selObj.options[selObj.selectedIndex].value==’xray(’) { 
            filterparam.innerHTML=’ ’; 
            sample.style.filter=selObj.options[selObj.selectedIndex].value+’)’; 
            } 
    if (selObj.options[selObj.selectedIndex].value==’none’) { 
        sample.style.filter=’’; 
        filterparam.innerHTML=’ ’;} 
    selObj.selectedIndex=0; 

      

  4.   

    http://gamvan.com/web/HScript/2005/6/440_2.html
    看看这个网页里面怎么用的
      

  5.   

    MSDN的说明,不知道咋用IHTMLElement2::addFilter Method--------------------------------------------------------------------------------Adds the specified filter to the list of filters influencing this element.SyntaxHRESULT addFilter(          IUnknown *pUnk
    );
    ParameterspUnk
    [in] Pointer to the IUnknown interface of the filter to be added. 
    Return ValueReturns S_OK if successful, or an error value otherwise. See AlsoIHTMLElement2::removeFilter