javascript - How to store variable data in other variable and parse it -


i'm looking way, how set data var title, other data ( var t ), , see result in page source. have:

// example: home var title = document.title;  var t = title; 

now, in souce view, var title = document.title , var t also.

how can parse code, , see document.title returned value ?

thanks explain.

with code: var title = document.title

i want see in source code of browser: var title = 'title of page being viewed' instead of var title = document.title

this isn't how javascript works.

it dynamic scripting language runs in web browser , affects visitors page only.

when choose view source looking @ underlying code before executed.

if want pull information source need either:

  • screen scraping
  • web services

screen scraping process of downloading webpage , looking inside of pull information out. can messy if website changes layout of page or content badly formatted.

a better way provide information 3rd party sources create web service. gives api can query , can return data in computer readable format.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -