【发布时间】:2014-07-18 14:48:16
【问题描述】:
我在网络上到处都在关注教程来解决这个问题,因为我是 dojo 的新手,我知道 jquery,但 Dojo,没办法
我正在关注 stackoverflow 本身的链接,但无法找出代码:
http://stackoverflow.com/questions/18476084/dojo-and-javascript-lightweight-tooltip-in-onclick-on-anchor-tab
我试着写了一些代码,但它说的是
showDialog 未定义..
另外,要求是:
单击链接可打开链接后的对话框或工具提示,位于链接附近。
在关闭它的弹出窗口或工具提示内有一个链接,因此它实际上应该关闭提示或弹出窗口,
这是我到目前为止的尝试:
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.js"></script>
<script>
dojo.require("dijit.Dialog");
dojo.addOnLoad(showDialog);
elliotDialog = new dijit.Dialog({
title: "My Dialog",
content: "test content",
style: "width: 450px"
});
showDialog = function(){
// set the content of the dialog:
elliotDialog.set("title");
elliotDialog.set("content");
elliotDialog.show();
};
</script>
<a href="javascript:void(0);" onclick="showDialog();" class="moreLink">More pricing...</a></p>
<div dojoType="dijit.Dialog" id="elliotDialog" title="More Pricing Option">
</div>
【问题讨论】:
标签: javascript dojo