<legend id='eqzxu'><style id='eqzxu'><dir id='eqzxu'><q id='eqzxu'></q></dir></style></legend>
    • <bdo id='eqzxu'></bdo><ul id='eqzxu'></ul>

      <tfoot id='eqzxu'></tfoot>
    1. <small id='eqzxu'></small><noframes id='eqzxu'>

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

        JavaScript 相当于 PHP 的 __get() 魔法方法

        JavaScript#39;s equivalent to PHP#39;s __get() magic method(JavaScript 相当于 PHP 的 __get() 魔法方法)

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

        <tfoot id='Pq6SL'></tfoot>

        <legend id='Pq6SL'><style id='Pq6SL'><dir id='Pq6SL'><q id='Pq6SL'></q></dir></style></legend>
              <tbody id='Pq6SL'></tbody>

                • <bdo id='Pq6SL'></bdo><ul id='Pq6SL'></ul>
                  <i id='Pq6SL'><tr id='Pq6SL'><dt id='Pq6SL'><q id='Pq6SL'><span id='Pq6SL'><b id='Pq6SL'><form id='Pq6SL'><ins id='Pq6SL'></ins><ul id='Pq6SL'></ul><sub id='Pq6SL'></sub></form><legend id='Pq6SL'></legend><bdo id='Pq6SL'><pre id='Pq6SL'><center id='Pq6SL'></center></pre></bdo></b><th id='Pq6SL'></th></span></q></dt></tr></i><div id='Pq6SL'><tfoot id='Pq6SL'></tfoot><dl id='Pq6SL'><fieldset id='Pq6SL'></fieldset></dl></div>
                  本文介绍了JavaScript 相当于 PHP 的 __get() 魔法方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  可能的重复:
                  所有属性的 JavaScript getter

                  JavaScript 是否提供访问未定义对象属性的方法?在 PHP 中,解决方案是在类中声明并实现 __get() 方法.
                  使用 try { .. } catch { .. } 的解决方案对我来说是不够的,因为我已经有大量的代码实际上需要保持原样.

                  Does JavaScript provide a method to access undefined object properties? In PHP the solution is to declare and implement __get() method in class.
                  Solutions using try { .. } catch { .. } are not sufficient for me, because I already have very large amount of code which actually needs to stay as-is.

                  推荐答案

                  您可以选择编写一个类似的功能并根据 参数 数组.我不是 100% 认为这会解决您的问题.

                  You may choose to write a similar functionality and check existing parameters them against the arguments array. I'm not 100% that this will solve your problem.

                  这篇关于JavaScript 相当于 PHP 的 __get() 魔法方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

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

                  • <bdo id='Ci4Z7'></bdo><ul id='Ci4Z7'></ul>

                      1. <legend id='Ci4Z7'><style id='Ci4Z7'><dir id='Ci4Z7'><q id='Ci4Z7'></q></dir></style></legend>
                        • <tfoot id='Ci4Z7'></tfoot>
                          <i id='Ci4Z7'><tr id='Ci4Z7'><dt id='Ci4Z7'><q id='Ci4Z7'><span id='Ci4Z7'><b id='Ci4Z7'><form id='Ci4Z7'><ins id='Ci4Z7'></ins><ul id='Ci4Z7'></ul><sub id='Ci4Z7'></sub></form><legend id='Ci4Z7'></legend><bdo id='Ci4Z7'><pre id='Ci4Z7'><center id='Ci4Z7'></center></pre></bdo></b><th id='Ci4Z7'></th></span></q></dt></tr></i><div id='Ci4Z7'><tfoot id='Ci4Z7'></tfoot><dl id='Ci4Z7'><fieldset id='Ci4Z7'></fieldset></dl></div>

                            <tbody id='Ci4Z7'></tbody>