Is it possible to get the value of a element using onclick?

前端 未结 6 1603
[愿得一人]
[愿得一人] 2020-12-22 07:51

I currently have a table that has a list of email template names being echoed using php. Below is part of the php code. I\'m trying to grab the table value and pass it to

6条回答
  •  死守一世寂寞
    2020-12-22 08:28

    its work.

    function clickValue(elem) {
      var x = document.getElementById(elem).innerHTML;
      alert(x);
    }
    Coba
    value
    value yg ke 2

    Change id="*anyvalue*" and clickValue('*anyvalue*')

提交回复
热议问题