0
HTML:私はangularjsにTDのテキストを取得したいanglejsを使って隠れたtd要素のテキストを取得する方法は?
<td hidden ng-bind="msg.location" id="msg_location">/2/</td>
:よう
<td hidden ng-bind="msg.location" id="msg_location"></td>
ページの読み込み後に思えます。私は次のように試しました:
angular.element('#msg_location').html()
angular.element('#msg_location').text()
angular.element('#msg_location').innerHTML
しかし、上記のすべての解決法は空の文字列を返します。 誰でも助けてくれますか?
ありがとうございます。
あなたが.textContentを試すか.VALUEたのですか? –
私は値を試しましたが失敗しました。 –
https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent。ドキュメントでは.textContentは –