如何用星号混淆 [英] how to obfuscated with asterisks

查看:79
本文介绍了如何用星号混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JavaScript专家,


我有以下HTML。我怎么能使用JavaScript,当用户点击每行中的复选框时,电话号码和电子邮件地址会被星号部分混淆?

JavaScript Experts,

I have the following HTML. How could I use JavaScript such that when a user clicks on the checkbox in each row the phone numbers and e-mail addresses are partially obfuscated with asterisks?

展开 | 选择 | Wrap | 行号

推荐答案

您需要使用JavaScript而不是VBScript。你有没有开始使用JavaScript代码?


PS。 [code]标签有编号的行 - 没有必要手动添加它们。
You''ll need to use JavaScript rather than VBScript. Have you made a start on the JavaScript code?

PS. the [code] tags have numbered lines - there''s no need to add them manually.


但是,我发现一个问题,我无法存储更改。


我的意思是这个节目,(由javascriipt完成)


想象这个例如

页面像这样打开..

12332
sdfdf@dsdfs.com

检查(按钮)是否点击


更改为dis

123 ****

sdf ** @ *****



但是如果我刷新页面,

它再次改为

12332
sdfdf@dsdfs.com


所以,我不能保持混淆的价值,直到我改变.....

i需要保持混淆的价值....这就是yi尝试服务器端....

plz建议..
But , i found one problem , that i couldn able to store the changes .

I mean this eg shows , (done by javascriipt)

Visualise this eg
Page open like this..
12332
sdfdf@dsdfs.com
Check (button) if clicked

Changes to dis
123****
sdf**@*****


But if i refresh the page,
it again change to
12332
sdfdf@dsdfs.com

so, am not able hold the obfuscated value , untill i change.....
i need to hold the obfuscated value....thats y i tried server side....
plz suggest..


所以,最初你想要它显示了,但是一旦它被星号取代,它应该保持这种状态吗?

如果是这种情况,你将不得不使用服务器端代码。您可以提交和更改数据库(或数据存储的任何位置),这样当您下次刷新或显示页面时,就会出现星号。


如果您想避免重新加载更换页面时,可以使用Ajax。
So, initially you want it displayed, but as soon as it''s replaced by asterisks, it should remain that way?

If that''s the case, you''ll have to use server-side code. You can submit and change the database (or wherever the data is stored) so when you next refresh or display the page, the asterisks are there.

If you want to avoid a reload of the page when replacing, you can use Ajax.


这篇关于如何用星号混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆