I am trying to get URL property of the row and it doesn't work, can you help me?I just want to grab the URL value after the pipe | and before ", Wheat Husk"
<z:row ows_Title='We are together!' ows_ImageSize='620'
ows_MetaInfo='16;#vti_parserversion:SR|14.0.0.6120
URL:SW|http://collaboration/sites/athapali/SliderImages/nature1.jpg, Wheat Husk
vti_lastheight:IW|250 vti_lastwidth:IW|620
vti_description:SW|Lorem ipsum dolor sit volutpat.' />
My Javascript returns null..
var myurl=getURL( $('[ows_MetaInfo]').attr("ows_MetaInfo"));
alert (myurl);
function getURL(str){
str = str.replace(/(\r\n|\n|\r)/gm,"");
str = str.match(/URL:([^URL]*)/);
str = parseInt(str[1].split('|')[1]);
console.log(str);
return str;
;}
Try this:
var myurl=getURL( $('[ows_MetaInfo]').attr("ows_MetaInfo"));
function getURL(str){
str = str.match(/URL:\w{2}\|(.+),/);
alert(str[1]);
return str[1];
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.