javascript TextRange getBookmark( ), moveToBookmark( )

getBookmark( ), moveToBookmark( ) NN n/a IE 4(Win) DOM n/a  

getBookmark( ) moveToBookmark(bookmarkString)

  

These two methods work together as a way to temporarily save a text range specification and restore it when needed. The getBookmark( ) method returns an opaque string (containing binary data that is of no value to human users). Once that value is stored in a variable, the range can be modified as needed for the script. Some time later, the bookmarked text range can be restored with the moveToBookmark( ) method:

var rangeMark = myRange.getBookmark( );
...
myRange.moveToBookmark(rangeMark);
 
Parameters
 
  • An opaque string returned by the getBookmark( ) method.
 
Returned Value

Boolean value: true if the operation is successful; false if unsuccessful.


2107,Nickname,Homepage or email,Comments here,Add comment