Edit in JSFiddle

$( "body:contains('hoge')" ).css( "color", "red" );
<body>
 
hoge
moge
hage
unk
  
</body>