在這個例子中,我嘗試使用兩個createhtml來顯示一個簡單的網格。簡單的一個(斜體文本)顯示,但超鏈接不。我怎樣才能使超鏈接可見?在createhtml中顯示超鏈接
function test() {
var app = UiApp.createApplication().setTitle('Test html')
var panel = app.createVerticalPanel();
var grid = app.createGrid(4,1);
grid.setWidget(1, 0, app.createLabel('Label'));
grid.setWidget(2, 0, app.createHTML('<a href="http://www.google.com">Try Google</a>').setId('dir'));
grid.setWidget(3, 0, app.createHTML('<em>This is italic text</em>'));
panel.add(grid);
app.add(panel);
DocumentApp.getUi().showSidebar(app);
}
Thnx尋求幫助!