【问题标题】:Using JOptionPane on an HTML/PHP page在 HTML/PHP 页面上使用 JOptionPane
【发布时间】:2014-04-17 00:13:19
【问题描述】:

/我正在尝试弹出一条简单的消息。我按照我在每个教程页面上看到的那样放入代码,但它会出现我不太理解的错误。

<html>
<head>

<script type="text/javascript">
JOptionPane.showMessageDialog(null, "Store Notice!", "Shipping information...", JOptionPane.WARNING_MESSAGE);
</script>

</head>

<iframe src="http://www.site.com/index.html" width="701" height="1500"></iframe>
</html>

我已将网站链接编辑掉。

查看代码时我得到的错误是:

[错误] ReferenceError:找不到变量:JOptionPane 全局代码 (index.html,第 13 行)

我需要包含什么来解决这个问题?

感谢您的帮助!

【问题讨论】:

  • JavaScript 不是 Java!

标签: php html integration joptionpane


【解决方案1】:

您正在尝试在 php/html 文件中添加 javax.swing 对象。这怎么可能。 有关JOptionPane 的更多详细信息,请阅读thisJava 和 PHP 是不同的平台。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-16
    • 2021-05-26
    • 2013-02-20
    • 1970-01-01
    • 1970-01-01
    • 2015-12-18
    • 2011-04-26
    • 1970-01-01
    相关资源
    最近更新 更多