我想在网上有一个文本箱,有自己的加密和加密程序。 用户进入“gwkki”,即“hello”。
此处的加密钥匙是正确信函之后的关键板上的每一封信:
h turns to g
e turns to w
l turns to k
o turns to i
“hello”改为“gwkki”
我希望,一旦文本箱中的“gwkki”用户类型出现,文本箱就会显示“hello”。 Can 我写了一封信,用这一编码办法监测每个关键人物并替换每封信件?
我想在网上有一个文本箱,有自己的加密和加密程序。 用户进入“gwkki”,即“hello”。
此处的加密钥匙是正确信函之后的关键板上的每一封信:
h turns to g
e turns to w
l turns to k
o turns to i
“hello”改为“gwkki”
我希望,一旦文本箱中的“gwkki”用户类型出现,文本箱就会显示“hello”。 Can 我写了一封信,用这一编码办法监测每个关键人物并替换每封信件?
可以用纯js或js和php来做到这一点。
您可以利用在html上的“Change”活动手记,跟踪对外地所作的变化:
<input type="text" id="fieldName"
onchange="encode(this.id)">
and then you can write a simple function like :
<script type="text/javascript">
function upperCase(x)
{
var y=document.getElementById(x).value
//HERE YOU DECODE/ENDCODE the variable
//AND THEN DISPLAY IT WHERE EVER YOU WANT
document.getElementById(**THIS IS THE ID OF WHERE YOU WANNA DISPLAY THE VALUE**).value=y
}
</script>
http://www.w3schools.com/jsref/jsref_replace.asp”rel=“nofollow” http://www.w3schools.com/jsref/jsref_replace.asp。
你可以。 当用户集中关注这些投入时(可使用focus
和blur
。 当用户集中关注这一投入时,可以听取<代码>keypress活动的关键词句,并且你可以抓住最后一封被点击的信函的价值,假定该信不是删除的关键,并适当编码。
处理改变最后特性的一些伪装编码。 并非完全正确:
var listenForKeyPress = function (e) {
if ($.inArray(e.keyCode, ARRAY_OF_CHARS_TO_ENCODE)) {
var el = $(this),
value = el.val();
// Set the value after we encode it
el.val(value.slice(0, value.length - 2) + encode(value[value.length - 1]);
}
};
$( #my-input ).focus(function () {
$(this).bind( keypress , listenForKeyPress);
});
$( #my-input ).blur(function () {
$(this).unbind( keypress , listenForKeyPress);
});
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.
I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...
Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...
Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...
I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...
Is it possible for someone to give me a few pointers on how to display a multidimensional array in the form of a bar graph? The array is multidimensional, with three elements in each part - and the ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.