Giter Club home page Giter Club logo

gumbo-elss's Introduction

gumbo-Elss

html选择器elss

image

image

于解析引擎无关的表达式解析引擎elss

        elss 0.0.1
            2018/09/25 17:57:00 修订
        人员:
            开发:海绵宝宝
            语法:我才是星辰
            吹牛逼的:二毛娃娃


        语法组成:指令

        3大基本语法:标签名  .class值   #id值 
        
        基本指令 > :
        
        多条指令使用语法:指令1 > 指令2 > 指令3 > ...

        基本语法规范:
        ----------------------------------------------------
        字符串和属性使用单引号或者双引号引起来
        ----------------------------------------------------


        基本函数:
        ----------------------------------------------------
        find(属性,内容)   为查找属性值为内容的标签
        fuzzyfind(属性,内容)   为查找属性值包含内容的标签
        ----------------------------------------------------


        基本功能1:
        ----------------------------------------------------
        说明:我想获取a标签的所有内容

        <a>1</a>
        <a>2</a>
        <a>3</a>

        指令:a
        ----------------------------------------------------

        基本功能2:
        ----------------------------------------------------
        说明:我想获取id为list1的div里面的a标签的所有内容

        <div id="list1">
            <dl>
                <dd>
                    <a>1</a>
                </dd>
                <dd>
                    <a>2</a>
                </dd>
                 <dd>
                    <a>3</a>
                </dd>
            </dl>
        </div>
        <div id="list2">
            <dl>
                <dd>
                    <a>4</a>
                </dd>
                <dd>
                    <a>5</a>
                </dd>
                 <dd>
                    <a>6</a>
                </dd>
            </dl>
        </div>


        指令1:#list1 > dl > dd > a
        或
        指令2:div:find('id','list1') > dl > dd > a
        ----------------------------------------------------

        功能1:
        ----------------------------------------------------
        说明:指令前面是. 则为匹配class属性,要匹配出233

        <div class="test">233</div>

        指令:.test
        ----------------------------------------------------


        功能2:
        ----------------------------------------------------
        说明:指令前面是# 则为匹配id属性,要匹配出233

        <div id="test">233</div>  

        指令:#test 
        ----------------------------------------------------


        功能3:
        ----------------------------------------------------
        说明:如果想指定标签属性筛选,要匹配出233

        <div id="test">233</div>
        <div id="test">266</div>  

        指令:div:find('id','test') 
        ----------------------------------------------------


        功能4:
        ----------------------------------------------------
        说明:如果想指定标签属性模糊筛选,要匹配出233和266

        <div id="test_123">233</div>
        <div id="test_456">266</div>

        指令:div:fuzzyfind('id','test_')
        ----------------------------------------------------
        
        功能5:
        ----------------------------------------------------
        支持函数链式操作
        div:find('id','test'):div:fuzzyfind('id','test_')>div>a
        支持以上所有语法混合
        div:find('id','test'):div>fuzzyfind('id','test_')
        
        ----------------------------------------------------
        
        
        qq群交流:551518556

gumbo-elss's People

Contributors

1694439208 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.