Home > front end >  No refresh update problem determination
No refresh update problem determination

Time:09-16

Below is online to find a piece of code, I want to add the following function in the following code, when the input is empty pop-up warning, input the value of the capital letters and Numbers only (or input lowercase when forced to uppercase) a combination of
 
<script SRC="https://bbs.csdn.net/js/jquery-2.1.1.min.js" & gt; </script>
$(function () {

$(' # table DDR). Click (function () {
if(! $(this) is (' input ')) {
$(this). AddClass (' input '). The HTML (' & lt; Input type="text" value="' + $(this). The text () + '"/& gt; '). The find (' input '). The focus (). The blur (function () {
Var thisid=$(this). The parent (). The siblings (" th: eq (0) "). The text ();
Var thisvalue=https://bbs.csdn.net/topics/$(this). Val ();
Var thisclass=$(this). The parent (). The attr (" class ");

$.post (" update. PHP, "
{
Thisid: (thisid),
Thisclass: (thisclass),
Thisvalue: (thisvalue)
});


$(this). The parent (). RemoveClass (' input '). The HTML ($(this). Val () | | 0);
});
}
{}). Hover (function ()
$(this). AddClass (' hover ');
}, function () {
$(this). RemoveClass (' hover ');
});

});
</script>


 


The serial number & lt;/strong>
SN started & lt;/strong>
End of the SN & lt;/strong>
Release time & lt;/strong>
Operation & lt;/strong>


1


2020/6/18 now & lt;/td>



2 & lt;/td>


2020/6/18 now & lt;/td>



Release: & lt;/td>
CodePudding user response:


On the HTML page and see if it is you need

CodePudding user response:

reference chinaskysun reply: 3/f
& lt; Input type="text" onkeyup="this.value=https://bbs.csdn.net/topics/this.value.replace (/[^ a - zA - Z0-9]/, ' '). The toLocaleUpperCase ()" & gt;

On the HTML page and see if it is you need

I am to realize this function in the following code, because becomes input, click the cell would then make judgement,
 & lt; Script SRC="https://bbs.csdn.net/js/jquery-2.1.1.min.js" & gt; </script> 
$(function () {

$(' # table DDR). Click (function () {
if(! $(this) is (' input ')) {
$(this). AddClass (' input '). The HTML (' & lt; Input type="text" value="' + $(this). The text () + '"/& gt; '). The find (' input '). The focus (). The blur (function () {
Var thisid=$(this). The parent (). The siblings (" th: eq (0) "). The text ();
Var thisvalue=https://bbs.csdn.net/topics/$(this). Val ();
Var thisclass=$(this). The parent (). The attr (" class ");

$.post (" update. PHP, "
{
Thisid: (thisid),
Thisclass: (thisclass),
Thisvalue: (thisvalue)
});


$(this). The parent (). RemoveClass (' input '). The HTML ($(this). Val () | | 0);
});
}
{}). Hover (function ()
$(this). AddClass (' hover ');
}, function () {
$(this). RemoveClass (' hover ');
});

});
null
  • Related