在PHP中有一个JQuery DOM操纵器/ CSS选择器等价类吗? [英] Is there a JQuery DOM manipulator/CSS selector equivalent class in PHP?

查看:139
本文介绍了在PHP中有一个JQuery DOM操纵器/ CSS选择器等价类吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以使用 DOMDocument DOMXPath 来操作XML文件。但是,我真的很喜欢JQuery,如果有更像JQuery在PHP的世界,我可以用于服务器端DOM操作,这将是巨大的。

我只对如何
感兴趣JQuery选择和操作DOM,如下:

不是所有的
JQuery的其他部分(我猜
你可以说只是流行和 Sizzle < a>
parts)。




更新:

看起来有一个等效的选择器函数,但就操作函数而言,我想我必须坚持使用DOMDocument。



http://framework.zend.com/manual/en/zend.dom.query.html a>



享受:)


I know that I can use DOMDocument and DOMXPath to manipulate XML files. But, I really love JQuery, and it would be great if there was something more like JQuery in the PHP world that I could use for sever side DOM manipulation.

NOTE: I'm only interested here in how JQuery Selects and Manipulates the DOM, not all the other parts of JQuery (I guess you can say just the Pop and the Sizzle parts).


Update:
It looks like there is an equivalent for the selector functions, but as far as the manipulation functions I guess I have to stick with DOMDocument.

解决方案

Well, excluding all the JavaScript specific stuff you're left with a CSS selector engine:

http://framework.zend.com/manual/en/zend.dom.query.html

Enjoy :)

这篇关于在PHP中有一个JQuery DOM操纵器/ CSS选择器等价类吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆