| |

VerySource

 Forgot password?
 Register
Search
View: 1461|Reply: 4

Issues triggered by input text events

[Copy link]

2

Threads

5

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-11-11 11:00:02
| Show all posts |Read mode
<INPUT TYPE="TEXT" ID="ID1" NAME="ID1" SIZE="20" onchange="aaa();">

   Such a statement, after I input it by hand, the onchange event is triggered and execute aaa()
   But I use the program to change the value of ID1, such as this:
   
   document.getElementById('IDl').value='99999';
   The onchange event is not triggered. I tried several events, and when I wrote the value in the program, the event could not be triggered.
   I don't know if I can use the method of imitating events.
   Thank you experts for your advice.
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-11-11 11:15:01
| Show all posts
onpropertychange
Reply

Use magic Report

2

Threads

5

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-11-11 14:45:01
| Show all posts
Don't understand the meaning upstairs
Please advise in detail, thank you!
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-11-11 15:00:01
| Show all posts
<INPUT TYPE="TEXT" ID="ID1" NAME="ID1" SIZE="20" onpropertychange="aaa();">
Reply

Use magic Report

2

Threads

5

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-11-11 16:00:01
| Show all posts
Thank youcjj841112

  I interviewed in VS and used one TEXT plus two BUTTONs
  One BUTTON is a server control, and the other is an HTML control.
  HTML BUTTON fires a function to change the value of TEXT.
  onpropertychange event is fired

  But the server BUTTON control, modify the value of TEXT in the background, the foreground can display it immediately,
  The onpropertychange event is not fired

  Thank you for your advice, thank you
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list