In this example, I have made some demo for Anchor with different stylings.

First anchor opens in same window.


Example Demo:

Example Code:

function doGet() {

  var app = UiApp.createApplication();

  var panel = app.createVerticalPanel();

  //Create Anchor

  var anchor1 = app.createAnchor('Anchor 1', '');

  //Setting the anchor href using setHref

  var anchor2 = app.createAnchor('Anchor 2', '').setHref('');


  //Add the anchors to panel



  //Add the panel to the application


  return app;