Welcome, Guest
Username: Password: Remember me

TOPIC: problem from the javascript workround manual

problem from the javascript workround manual 1 month 4 weeks ago #109268

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 177
  • Thank you received: 1
  • Karma: 0
the design:when use click answer M of single choice question, jump to a website.
the code:
<script>
$(document).ready(function () {
document.getElementById("answer286325X1X95M").onclick={window.location="http://www.example.com"}
}
);
</script>
the result: no feedback
i have no idea what's the problem but i feel it's a big problem.really need help!
The administrator has disabled public write access.

problem from the javascript workround manual 1 month 4 weeks ago #109269

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
Try
$(document).ready(function () {
  $("#answer{GSQ}M").click(function(){
    window.location.href="http://www.example.com"
  });
});
Last Edit: 1 month 4 weeks ago by DenisChenu.
The administrator has disabled public write access.
The following user(s) said Thank You: iscar

problem from the javascript workround manual 1 month 4 weeks ago #109279

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 177
  • Thank you received: 1
  • Karma: 0
you are the best!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.150 seconds
Donation Image