Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Revisions

2 of 2
Commonmark migration
  • onchange="check_extension(one)"

    Here one is the Node with the id "one", one is not the string "one"

  • document.getElementById("$field_id");

    Even if $field_id is the id "one", "$field_id" is a different string
    So getElementById("$field_id") will give you the node with id "$field_id", not the node with id "one".

Fixes

onchange="check_extension('one')"

and

document.getElementById($field_id)

Also I discourage naming string variables with a leading $

Volune
  • 4.3k
  • 24
  • 23

AltStyle によって変換されたページ (->オリジナル) /