当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Serialize a DOM range

问题描述:

is there any standard/easy way to serialize a DOM Range (and the IE equivalent) with java script.

The motivation is to store the current selection for a document together with its HTML code.


I thought of using XPath for it, but before I start to reinventing the wheel maybe there is something already working available and I just haven't found it (best would be a jQuery based solution).

网友答案:

I think I got the answer visit link below : Rangy, A cross-browser JavaScript range and selection library

网友答案:

There have been a few times I would have found something like this useful and I don't know of anything that currently exists. XPath seems the logical choice to me.

分享给朋友:
您可能感兴趣的文章:
随机阅读: