简体   繁体   中英

How would I create a reference to a link within a javascript file?

I'm trying to create a click to link within my javascript file that supports a google map page. I've tried to figure out the the syntax, but I haven't had any luck.

Here's the code:

  var point = new GLatLng(35.4068122740699,-78.73926043510437);
  var marker = createMarker(point,"Admissions","<strong>Admissions</strong><br><img src='building3.jpg' height='93' width='140'><br><strong>Go to Building → </strong>")
  map.addOverlay(marker);

I want 'Go to Building' to be the click to link.

You can update this:

<a href='#'><strong>Go to Building → </strong></a>

in your string.


var marker = createMarker("all other as is--><a href='#'><strong>Go to Building → </strong></a>")

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM