(function($){
$.fn.getQuery = function(options){
o = $.extend({
type: 'xpath', //生成类型 'xpath' or 'selector'
highLight : true, //选择的元素是否高亮显示
fullPath : false, //是否是全路径
preferenceAttr: 'id', //属性偏好 'id' or 'class'
bgColor: 'yellow', //背景色
border:'yellow 1px solid',//边框
expansion: 3,//扩大边框
}, options||{});
if(o.highLight){
this.highLight(o);
}
var path = getPath(this, '');
selector = path.replaceAll('/', '>').replaceAll('\\[', ':eq(').replaceAll('\\]', ')').replaceAll('\\:eq\\(\\@', '[').replaceAll('\'\\)', '\']');
query = '/' + path;
if(!o.fullPath){
query = '/' + query;