pyhy

关键:document.title属性

代码:

<!DOCTYPE html>
<html lang="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<head>
     <title>Filename</title>
    </head>

     <body>
        <button onclick="modifyTitle(\'ABC.bmp\')">Click</button>
     </body>
</html>
<script type="text/javascript">
<!--
//-------------------------------
// 更改Title
//-------------------------------
function modifyTitle(filename){
    var title=document.title;// 取值

    title=title.replace("Filename",filename);// 替换

    document.title=title;// 赋值
}
//-->
</script>

END

分类:

技术点:

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-06-27
  • 2022-12-23
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案