<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>index</title> <style> *{ font-family: 微软雅黑; } </style> </head> <body> <h1 info='linux is very much!' id='hid'>linux is very much!</h1> </body> <script> hidobj=document.getElementById('hid'); alert(hidobj.info); hidobj.info='php'; </script> </html>