Welcome, Guest
Username: Password: Remember me

TOPIC: problem from the javascript workround manual

problem from the javascript workround manual 1 year 3 months ago #109268

  • iscar
  • iscar's Avatar
  • Offline
  • Banned
  • Posts: 312
  • Thank you received: 1
  • Karma: -4
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 year 3 months ago #109269

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 7503
  • Thank you received: 1023
  • Karma: 297
Try
$(document).ready(function () {
  $("#answer{GSQ}M").click(function(){
    window.location.href="http://www.example.com"
  });
});
Last Edit: 1 year 3 months 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 year 3 months ago #109279

  • iscar
  • iscar's Avatar
  • Offline
  • Banned
  • Posts: 312
  • Thank you received: 1
  • Karma: -4
you are the best!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.132 seconds