@UiField Hyperlink historyLink;
this.historyLink.getElement().setAttribute("rel", "nofollow");
これは、含まれている div の rel 属性を設定します。
<div class="gwt-Hyperlink" rel="nofollow"><a href="#!h:home">history</a></div>
a
タグを取得するにはどうすればよいですか?
@UiField Hyperlink historyLink;
this.historyLink.getElement().setAttribute("rel", "nofollow");
これは、含まれている div の rel 属性を設定します。
<div class="gwt-Hyperlink" rel="nofollow"><a href="#!h:home">history</a></div>
a
タグを取得するにはどうすればよいですか?
a
この方法で要素を取得できます
Element a = historyLink.getElement().getFirstChildElement();
InlineHyperlink
代わりにan を使用することもできますが(div
ラッパーがまったく必要ない場合)、実際には#hashrel=nofollow
のみの hrefを含むリンクでの の使用を理解していません: Google AJAX クロール用の場合は、できませんリクエストに応じて送信する HTML スナップショットにリンクを出力しないだけですか?_escaped_fragment_