Welcome, Guest
Username: Password: Remember me

TOPIC: problem from the javascript workround manual

problem from the javascript workround manual 5 months 5 days ago #109268

  • iscar
  • iscar's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 210
  • 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 5 months 5 days ago #109269

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

problem from the javascript workround manual 5 months 5 days ago #109279

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