2

オブジェクトの下に関数を設定すると、一度だけ使用できます

function handle(selector)
{
    return{
        elem:selector,
        next:function(){
            return (this.nextSibling.nodeType==1) ? this.nextSibling : this.nextSibling.nextSibling;
        }
    }
} 

ここで私はhandle.next()これがうまくいくと言うことができますがhandle.next().next().next()、私の質問はjqueryのようにこのようにどのように使用できるかということです?

4

1 に答える 1