热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

intlTelInputisnotafunction

Hello,Iknowthisissuehasbeenreportedmanytimesbutnoneoftheanswershavebe

Hello,
I know this issue has been reported many times but none of the answers have been able to fix my problem.

Steps to reproduce

Same as the Github ones, both css and js imports (that is the right path):

1

1

My input is generated dynamically with a 'tel' type
I then check the type and execute the following code:

1
2
3
4
if (columnData.forminfo.fields[u].inputtype === "tel") {

    var input = $("#"+columnData.forminfo.fields[u].inputid);

    window.intlTelInput(input);

}

But I also tried this (with the utils import too):

1
2
3
4
5
var input = document.querySelector("#"+columnData.forminfo.fields[u].inputid);

var iti = intlTelInput(input, {

        utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input.0.3/build/js/utils.js",

    });

}

Expected behaviour

I should have had my input created with the flag version.

Actual behaviour

I get an error: 'intlTelInput is not a function'.

Initialisation options

I put my code above.

If I don't use the

1
window.

in the first code, I get a 'intlTelInput is not defined' if it can help.

Thanks!

该提问来源于开源项目:jackocnr/intl-tel-input

-software these imports worked for me




1
import intlTelInput from 'intl-tel-input'

1
import 'intl-tel-input/build/js/utils.js'


   



推荐阅读
  • 开发笔记:基于java eclipse+jsp+mysql+servlet+Spring的学生信息管理系统基础版建议收藏
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了基于javaeclipse+jsp+mysql+servlet+Spring的学生信息管理系统基础版建议收藏相关的知识,希望对你有一定的参考价 ... [详细]
  • 很多人问过我,H5的多线程如何实现WebWorker的?当我们说到这个问题的时候首先你需要知道,什么是WebWorker,那么今天就来给大家解答下这个问 ... [详细]
  • FTP弱密码将FTP服务器的密码更改为强密码vietcvsftpdvsftpd.confanonymous_enableNO#禁止匿名登录重启ftp服务 ... [详细]
  • 开发笔记:代码发布项目
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了代码发布项目相关的知识,希望对你有一定的参考价值。代码发布概述图 ... [详细]
  • js移动端关于页面布局,如果底部有position:fixed的盒子,又有input,当软键盘弹出收起都会影响页面布局。这时候Android可以监听resize事件,代码如下,而i ... [详细]
  • JS即为JavaScript缩写,jQuery是一个JavaScript库,jQuery极大地简化了JavaScript编程。JavaScript和j ... [详细]
  • DescriptionTherearen(2InputThefirstlinecontainsoneinteger,indicatingthenumberoftestc ... [详细]
  • 滴水穿石13 网络编程
    1UPD协议发送和接收1.1基础版packaged13;importjava.net.DatagramPacket;importjava.net.DatagramSocket; ... [详细]
  • ProblemStatementDolphinresidesintwo-dimensionalCartesianplane,withthepositive x-axispointi ... [详细]
  • JS脚本的基础应用
    1、Shang改变span的值,为“Shang0109”functionChangeSpanText( ... [详细]
  • 内容java基础巩固笔记-实现AOP功能的封装与配置的小框架设计(目录):XXXjava.util.ArrayList中代码Advice接口MyAdvice类BeanFactory ... [详细]
  • HTML5中Viewport的参数介绍以及使用方法
    web前端|H5教程Viewport,参数,使用web前端-H5教程互联网发展越来越快,各种技术层出不穷,其中各种设备的显示尺寸分辨率大小不一,这也是目前我们前端人员比较纠结的问题 ... [详细]
  • 这篇文章给大家分享的是有关jquery读取json参数的示例的内容。小编觉得挺实用的,因此分享给大家做个参考。一起跟随小编过来看看吧。jquery读取jso ... [详细]
  • 基于LNMP环境安装配置phpMyAdmin4.8
    phpMyAdmin是一个以PHP为基础、以Web-Base方式架构在网站主机上的、可以通过web方式管理和操作MySQL数据库的管理工具。本文主要内容为基于LNMP环境安装php ... [详细]
  • AJAX核心XMLHttpRequest的属性和方法介绍_javascript
    2019独角兽企业重金招聘Python工程师标准前一段时间开始研究AJAX,当然最基础的AJAX核心XMLHttpRequest当然是要研究的了, ... [详细]
author-avatar
qaqa
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有