There is no own way to do this, but what you can do is define a separator between identifier and offset, for example. /then analyze it.
For instance:
/ path / to / page # Identifier / 200
. , , , (, -?)
function moveToHash() {
function offset(node) {
var x = 0, y = 0; do {
x += node.offsetLeft;
y += node.offsetTop;
} while (node = node.offsetParent);
return {x: x, y: y};
}
var id = location.search.match(/([^\/]+)/)[1];
var offset = location.search.match(/\/(.+)/)[1] * 1;
var nodeOffset = offset(document.getElementById(id));
window.scrollTo(nodeOffset.x, nodeOffset.y);
window.scrollBy(0, offset);
}