jQuery でdocument.body.innerText;どのように呼び出すかを知る必要があります。document.body.innerHTML;jQueryはdocument.bodyで始まるjavascriptメソッドをどのように処理しますか...
ありがとう
jQuery でdocument.body.innerText;どのように呼び出すかを知る必要があります。document.body.innerHTML;jQueryはdocument.bodyで始まるjavascriptメソッドをどのように処理しますか...
ありがとう
// document.body.innerText;
$('body').text();
//document.body.innerHTML;
$('body').html();
$('body')またはを使用$(document.body)してボディを選択します。次に、 と を使用.text()し.html()て、関連するコンテンツを取得できます。
$("id/class/name/document")選択することであり、html()(innerhtml ) とtext()(innertext ) を使用して内容を確認できます。
1-テキスト()
<div class="demo">Demonstration Box</div>
The code $('.demo').text() would produce the following result:
これは選択することです--^^^^^^^^^^^^^^---クラスの内容へdemo
出力:
Demonstration Box
2 -html()
<div class="demo"><p>Demonstration Box</p></div>
$("input").html("text"); will change the---^^^^^^^^^^^^^^^^^---to text
$('body').text(); // innertext
$('body').html();//innerhtml