【问题标题】:GWT. How to get html tag list总重量。如何获取html标签列表
【发布时间】:2012-01-05 11:19:38
【问题描述】:

在 Javascript 中,我可以写:

var circles = document.all.tags("circle");

在 circles 变量中,我将有一个圆形标签列表。

如何在 GWT 中执行此操作? 我写道:

public final native void getPoints() /*-{
    this.points = $doc.all.tags("circle");
}-*/;

public final native String toJSON() /*-{
    return $wnd.JSON.stringify(this);
}-*/;

但是当我调用toJSON 方法时,我有异常。

【问题讨论】:

  • InvocationTargetException 没有任何描述。

标签: html json gwt jsni


【解决方案1】:

您在 Document 类中有 getElementByTagName()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-09-01
    • 2019-08-22
    • 1970-01-01
    • 1970-01-01
    • 2016-04-21
    • 1970-01-01
    • 1970-01-01
    • 2015-04-25
    相关资源
    最近更新 更多