日暮途遠(Linux)

Just another WordPress.com site

javascriptでページタイトルとURLを取得

leave a comment »

url_link_text = <<-"EOS"
<div style="font-size:8pt;">

    document.write("このページ内位置のURL:<br>- " + document.title + " " + "#{@fs[i]} " + location.href +"##{id + 1}");

</div>

EOS

 ヒアドキュメントでHTMLのコードを変数に代入。

Written by 廣野秀樹

2021年7月3日 @ 1:57 午後

カテゴリー: 未分類

コメントを残す