Javascript examples for jQuery Method and Property:html
get a html element to be a php variable
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> </head> //ww w . j ava 2s. c o m <body> <h1 class="example">this is going to be the title</h1> <script> var my = $(".example").html(); $('title').html(my); </script> </body> </html>