<i id='iLFkh'><tr id='iLFkh'><dt id='iLFkh'><q id='iLFkh'><span id='iLFkh'><b id='iLFkh'><form id='iLFkh'><ins id='iLFkh'></ins><ul id='iLFkh'></ul><sub id='iLFkh'></sub></form><legend id='iLFkh'></legend><bdo id='iLFkh'><pre id='iLFkh'><center id='iLFkh'></center></pre></bdo></b><th id='iLFkh'></th></span></q></dt></tr></i><div id='iLFkh'><tfoot id='iLFkh'></tfoot><dl id='iLFkh'><fieldset id='iLFkh'></fieldset></dl></div>

    <bdo id='iLFkh'></bdo><ul id='iLFkh'></ul>

  • <legend id='iLFkh'><style id='iLFkh'><dir id='iLFkh'><q id='iLFkh'></q></dir></style></legend>
    <tfoot id='iLFkh'></tfoot>

        <small id='iLFkh'></small><noframes id='iLFkh'>

        在 Drupal 中为 OnLoad 添加一个函数

        Add a function to OnLoad in Drupal(在 Drupal 中为 OnLoad 添加一个函数)
          <bdo id='4Tnvm'></bdo><ul id='4Tnvm'></ul>

            • <i id='4Tnvm'><tr id='4Tnvm'><dt id='4Tnvm'><q id='4Tnvm'><span id='4Tnvm'><b id='4Tnvm'><form id='4Tnvm'><ins id='4Tnvm'></ins><ul id='4Tnvm'></ul><sub id='4Tnvm'></sub></form><legend id='4Tnvm'></legend><bdo id='4Tnvm'><pre id='4Tnvm'><center id='4Tnvm'></center></pre></bdo></b><th id='4Tnvm'></th></span></q></dt></tr></i><div id='4Tnvm'><tfoot id='4Tnvm'></tfoot><dl id='4Tnvm'><fieldset id='4Tnvm'></fieldset></dl></div>

              <small id='4Tnvm'></small><noframes id='4Tnvm'>

              <tfoot id='4Tnvm'></tfoot>
                  <tbody id='4Tnvm'></tbody>
                  <legend id='4Tnvm'><style id='4Tnvm'><dir id='4Tnvm'><q id='4Tnvm'></q></dir></style></legend>
                  本文介绍了在 Drupal 中为 OnLoad 添加一个函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的一个皮肤/主题的左侧栏中有一个 HTML/文本默认模块.我在那里有一些 Javascript 我试图将今天的日期设置为我的 javascript 日期下拉列表.我无法使用body.onLoad",因为 Drupal 以某种方式阻止了它?

                  I have a HTML/text default module in the left bar of one of my skins/themes. I have some Javascript in there I'm trying to set today date to my javascript date dropdowns. I am unable to use 'body.onLoad' because Drupal is blocking it somehow?

                  我找到了一个解决方案,说我可以在这里添加我的 javascript 函数:如果(isJsEnabled()){addLoadEvent(yourCustomJSFunction);}

                  I found a solution saying I can add my javascript function here: if (isJsEnabled()) { addLoadEvent(yourCustomJSFunction); }

                  如果我只使用默认的 HTML/文本模块,我该如何添加?

                  How can I add that if I'm just using a default HTML/text module?

                  谢谢!

                  推荐答案

                  Drupal 使用 jQuery JavaScript 库.您编写的用于 Drupal 的任何 JavaScript 最好也应该使用 jQuery.查看 api 上的 JavaScript 启动指南.drupal.org 了解一些基础知识,特别是 Drupal.behaviors 部分.

                  Drupal uses the jQuery JavaScript library. Any JavaScript you write to work with Drupal should ideally use jQuery as well. Check out the JavaScript Startup Guide on api.drupal.org for some basics, particularly the Drupal.behaviors section.

                  这篇关于在 Drupal 中为 OnLoad 添加一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I pass parameters into a PHP script through a webpage?(如何通过网页将参数传递给 PHP 脚本?)
                  PHP - include a php file and also send query parameters(PHP - 包含一个 php 文件并发送查询参数)
                  Where can I read about conditionals done with quot;?quot; and quot;:quot; (colon)?(我在哪里可以阅读有关使用“?完成的条件的信息?和“:(冒号)?)
                  Accessing arrays whitout quoting the key(在不引用键的情况下访问数组)
                  What is the name for the quot;lt;lt;lt;quot; operator?(“lt;lt;lt;的名字是什么?操作员?)
                  default as first option in switch statement?(默认为 switch 语句中的第一个选项?)

                  <legend id='MWGZa'><style id='MWGZa'><dir id='MWGZa'><q id='MWGZa'></q></dir></style></legend>
                  <tfoot id='MWGZa'></tfoot>

                    <tbody id='MWGZa'></tbody>
                      <i id='MWGZa'><tr id='MWGZa'><dt id='MWGZa'><q id='MWGZa'><span id='MWGZa'><b id='MWGZa'><form id='MWGZa'><ins id='MWGZa'></ins><ul id='MWGZa'></ul><sub id='MWGZa'></sub></form><legend id='MWGZa'></legend><bdo id='MWGZa'><pre id='MWGZa'><center id='MWGZa'></center></pre></bdo></b><th id='MWGZa'></th></span></q></dt></tr></i><div id='MWGZa'><tfoot id='MWGZa'></tfoot><dl id='MWGZa'><fieldset id='MWGZa'></fieldset></dl></div>

                        <bdo id='MWGZa'></bdo><ul id='MWGZa'></ul>

                          • <small id='MWGZa'></small><noframes id='MWGZa'>