我想在 drupal 7 中以屏蔽格式显示电子邮件 ID 和手机号码?需要建议
I want to display the Email Id and Mobile number in masked format in drupal7? Suggestions needed
示例。
raju327@gmail.com
9999888877
输出
rajuXXX@gmail.com
999XXXX877
还有核心,我想使用 OTP 功能来修复按钮单击 OTP 密码只有客户应该更改用户名和密码。
检查工作示例,
$(document).ready(function () {
MobEncrypt();
EmailEncrypt()
});
function MobEncrypt() {
var value = '9999888877';
// make a string with x-characters
var x = new Array(value.length - 3).join('X');
// join this string with the tail of the value, and replace it
alert(x + value.substr(value.length - 3));
}
function EmailEncrypt() {
var value = 'raju327@gmail.com';
// make a string with x-characters
var x = new Array(value.length - 5).join('X');
// join this string with the tail of the value, and replace it
alert(x + value.substr(value.length - 5));
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
示例。
raju327@gmail.com
9999888877
输出
rajuXXX@gmail.com
999XXXX877
还有核心,我想使用 OTP 功能来修复按钮单击 OTP 密码只有客户应该更改用户名和密码。
检查工作示例,
$(document).ready(function () {
MobEncrypt();
EmailEncrypt()
});
function MobEncrypt() {
var value = '9999888877';
// make a string with x-characters
var x = new Array(value.length - 3).join('X');
// join this string with the tail of the value, and replace it
alert(x + value.substr(value.length - 3));
}
function EmailEncrypt() {
var value = 'raju327@gmail.com';
// make a string with x-characters
var x = new Array(value.length - 5).join('X');
// join this string with the tail of the value, and replace it
alert(x + value.substr(value.length - 5));
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>