Set homepage by code

วันก่อนมีรุ่นน้องที่เคารพ โทรมาหาถามว่า

พี่ เซ็ต homepage ทำยังไงอ่ะ พอดีไปเผลอกดตอบรับเซ็ต homepage ของเว็บนึงเข้า

คิดในใจ “โห โง่ว่ะ” แต่ตอบไปว่า

เข้าไปที่ Tools -> Internet option …

สวนกลับมาก่อนจะบอกจบว่า

ไม่ได้พี่ IT บล็อก

ค่อยเริ่มน่าสนใจหน่อย จะบอกให้ไปแก้จาก registry ก็คงจะโดนบล็อกอีก ก็เลยหาวิธีอื่นให้ สรุปได้ว่าใช้ code ข้างล่าง

1
2
3
4
5
6
7
8
9
10
11
12
<html>
<head>
<title>Set homepage</title>
</head>
<body>
<form name="HomepageForm">
<input type="text" name="urlbox">
<input type="button" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(document.HomepageForm.urlbox.value);" value="Set">
</form>

</body>
</html>

upload ให้ด้วยที่ http://tools.komkid.net/homepage.html เผื่อใครจะเจอสถานการณ์แบบนี้บ้าง (ใช้ได้เฉพาะ IE เท่านั้นเด้อ)

——————————————
อันนี้แปะไว้กันลืม Registry สำหรับ IE

1
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page


Written by Komkid on April 27th, 2010 with no comments.
Read more articles on Internet and JavaScript and Programming.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:

You have to be identified to write a comment.