str.link() , Cannot read property 'link' of undefined error

时间:2019-01-09 22:32:50

标签: javascript html html5 hyperlink

      var str = (data.User.g.number)
                  infoWindow.setContent(str.link("sms://" +  (data.User.g.number))) ;
                  infoWindow.open(map, this);

I created this code that creates a link in javascript with str.link. However, this method is not supported on all browsers which is why I got this error. I was wondering if anyone knows of an alternative method to what I want to accomplish or with the code I provided or knows why this code isn't working. I basically need to create a link only using javascript and be able to insert a variable in the link. Error

0 个答案:

没有答案