DHTMLX 可视化编辑器。如何使用生成的代码

发布于 2025-01-05 07:20:53 字数 1708 浏览 2 评论 0原文

我对网络编程有点陌生。使用 DHTML 3.0 Visual Designer 我创建了一个小网页,其中包含以下内容自动生成的代码:

dhtmlx.image_path='./codebase/imgs/';

    var main_layout = new dhtmlXLayoutObject(document.body, '1C');

    var a = main_layout.cells('a');
    a.setHeight('0');
    a.setWidth('0');
    a.hideHeader();
    a.fixSize(0,1);
    var toolbar_2 = a.attachToolbar();
    toolbar_2.setIconsPath('./codebase/imgs/');

    toolbar_2.loadXMLString('<toolbar><item type="button" text="" img="dhtmlxSuite/dhtmlxToolbar/codebase/imgs/dhxtoolbar_dhx_web/save.gif" imgdis="" title="Actualizar" /><item type="button" text="" img="dhtmlxSuite/dhtmlxToolbar/codebase/imgs/dhxtoolbar_dhx_web/text_document.gif" imgdis="" title="Editar" /><item type="button" text="" img="dhtmlxSuite/dhtmlxToolbar/codebase/imgs/dhxtoolbar_dhx_web/print.gif" imgdis="" title="Imprimir" /></toolbar>', function(){});

    var toolbar_1 = main_layout.attachToolbar();
    toolbar_1.setIconsPath('./codebase/imgs/');

    toolbar_1.loadXMLString('<toolbar><item type="button" text="N1" img="" /><item type="separator" /><item type="button" text="N2" /><item type="separator" /><item type="button" text="N3" img="" /><item type="separator" /><item type="button" text="N4" /><item type="separator" /><item type="button" text="N5" /></toolbar>', function(){});

我不明白如何将此代码放入 HTML 页面。我尝试用

I'm a bit new to web-programming. Using DHTML 3.0 Visual Designer I created a small web-page with the following automatically generated code:

dhtmlx.image_path='./codebase/imgs/';

    var main_layout = new dhtmlXLayoutObject(document.body, '1C');

    var a = main_layout.cells('a');
    a.setHeight('0');
    a.setWidth('0');
    a.hideHeader();
    a.fixSize(0,1);
    var toolbar_2 = a.attachToolbar();
    toolbar_2.setIconsPath('./codebase/imgs/');

    toolbar_2.loadXMLString('<toolbar><item type="button" text="" img="dhtmlxSuite/dhtmlxToolbar/codebase/imgs/dhxtoolbar_dhx_web/save.gif" imgdis="" title="Actualizar" /><item type="button" text="" img="dhtmlxSuite/dhtmlxToolbar/codebase/imgs/dhxtoolbar_dhx_web/text_document.gif" imgdis="" title="Editar" /><item type="button" text="" img="dhtmlxSuite/dhtmlxToolbar/codebase/imgs/dhxtoolbar_dhx_web/print.gif" imgdis="" title="Imprimir" /></toolbar>', function(){});

    var toolbar_1 = main_layout.attachToolbar();
    toolbar_1.setIconsPath('./codebase/imgs/');

    toolbar_1.loadXMLString('<toolbar><item type="button" text="N1" img="" /><item type="separator" /><item type="button" text="N2" /><item type="separator" /><item type="button" text="N3" img="" /><item type="separator" /><item type="button" text="N4" /><item type="separator" /><item type="button" text="N5" /></toolbar>', function(){});

I don't understand how to put this code into HTML page. I tried to surround this code with <script> tags, create function doOnLoad(), and then add <body onload="doOnLoad()" style="width:100%; height:100%; margin:0px; overflow:hidden;">. But it does not work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伴随着你 2025-01-12 07:20:53

检查文档

您需要

  • 放置基本的html标签
  • ,包括dhtmlx.js和dhtmlx.css
  • 放置脚本块,并粘贴设计器中的代码

Check the docs

You need to

  • place basic html tags
  • include dhtmlx.js and dhtmlx.css
  • place script block, and paste the code from designer
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文