Home > Back-end >  Change the page of js produce the value of the select, IE how to trigger the corresponding event - D
Change the page of js produce the value of the select, IE how to trigger the corresponding event - D

Time:10-09

Delphi control, IE can change the selected value of the select, but don't know how to trigger events.
Modify the selected select use is: doc. ParentWindow. ExecScript (' $(" # selRace "). Val (5); ', 'JavaScript');

Below is a net surface source
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
<script>
(function (data, card) {
Utils. Echo (" & lt; Select id='selRace & gt;" );
If (data. RaceList & amp; & Data. RaceList. Length) {
Var selected=data. LandingRaceId | | data. RaceList [0]. Id.
for (var i=0; I & lt; Data. RaceList. Length; I++) {
Var r=data. RaceList [I];
Utils. Echo ([
'& lt; The option value="', r.n umber, '" id="', r.i d, '"',
'data - id="', r.i d, '"',
'data - number="', r.n umber, '"',
'data - forecast="', r.f orecast, '"',
'data - quinella="', r.q uinella, '"',
'data - wp="', truly p, '"',
'data - pid="', r.p id, '" & gt; '
"Show only the first $0 field". The format (r.n umber),
'& lt;/option> ']. Join ("));
If (selected==r.i d) {
Data. LandingRaceNum=r.n umber.
}
}
} else {
Utils. Echo (' & lt; The option value="" selected> No event & lt;/option> ');
}
Utils. Echo (" & lt;/select>" );
$(" # selRace "). Val (data. LandingRaceNum);
}) (_storage_ [' raceList], _storage_ [' card '])
</script>



<script id="tpl_racesSelect" type="text/HTML" & gt;

</script>
& lt;/div>
  • Related