我需要在 International Telephone Input v17.0.13 的下拉菜单中禁用所有国家/地区名称。
我正在寻找一些“配置选项”,它将在下拉菜单中禁用国家名称。我只想在该下拉菜单中保留所有电话拨号代码。
如果在下拉菜单中禁用所有国家/地区名称的“配置选项”不存在,请告诉我如何以不同的方式进行操作?
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Basic Tutorial</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/css/intlTelInput.css">
<style>
h1, p{
text-align: center;
}
.iti__country-list {
min-width: 200px;
color: black;
}
.iti__dial-code {
color: black; /*#999*/
}
.iti--separate-dial-code .iti__selected-flag {
background-color: rgba(0, 0, 0, 0.05);
color: black;
}
</style>
</head>
<body>
<h1>Hello, world!</h1>
<div class="container-fluid">
<p class="heading">Basic Tutorial intlTelInput</p>
<form method="POST" class="form" data-class_data='1'>
<div class="form-group row row-box">
<div class="col-md-8 offset-md-4 col-box">
<div class="has-icon input">
<input class="form-control text" type="text" data-placeholder="true" id="phone" value="">
</div>
</div>
</div>
</form>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/intlTelInput-jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/2.0.10/lib/libphonenumber/build/isValidNumber.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
$("#phone").intlTelInput({
//Configuration Options
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/utils.js",
allowDropdown: true,
autoPlaceholder: "aggressive",
initialCountry: "auto",
separateDialCode: true,
initialCountry: "us",
});
});
</script><script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-DrT5NfxfbHvMHux31Lkhxg42LY6of8TaYyK50jnxRnM=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js" integrity="sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF" crossorigin="anonymous"></script>
</body>
</html>
.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Basic Tutorial</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/css/intlTelInput.css">
<style>
h1, p{
text-align: center;
}
.iti__country-list {
min-width: 200px;
color: black;
}
.iti__dial-code {
color: black; /*#999*/
}
.iti--separate-dial-code .iti__selected-flag {
background-color: rgba(0, 0, 0, 0.05);
color: black;
}
</style>
</head>
<body>
<h1>Hello, world!</h1>
<div class="container-fluid">
<p class="heading">Basic Tutorial intlTelInput</p>
<form method="POST" class="form" data-class_data='1'>
<div class="form-group row row-box">
<div class="col-md-8 offset-md-4 col-box">
<div class="has-icon input">
<input class="form-control text" type="text" data-placeholder="true" id="phone" value="">
</div>
</div>
</div>
</form>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/intlTelInput-jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/2.0.10/lib/libphonenumber/build/isValidNumber.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
$("#phone").intlTelInput({
//Configuration Options
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/utils.js",
allowDropdown: true,
autoPlaceholder: "aggressive",
initialCountry: "auto",
separateDialCode: true,
initialCountry: "us",
});
});
</script><script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-DrT5NfxfbHvMHux31Lkhxg42LY6of8TaYyK50jnxRnM=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js" integrity="sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF" crossorigin="anonymous"></script>
</body>
</html>