Hẳn ai có một website cũng muốn đặt nó là trang mặc định của một trình duyệt nào đó trên máy của người truy cập. Bạn có thể thêm đoạn mã nguồn này vào site : Khi ai đó truy cập vào website nó tự động thiết lập luôn
Code:
<html xmlns:IE> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style type='text/css'>
IE:homePage {behavior:url(#default#homepage)}
</style>
<script lanjuage='javascript'>
function thietlapHomePage()
{
bQueryHome = oHomePage.isHomePage('http://www.svvn-dresden.org/');
if (!bQueryHome) oHomePage.setHomePage('http://www.svvn-dresden.org/');
}
</script>
</head>
<body onload='thietlapHomePage();'>
<IE:homePage ID="oHomePage" />
</body>
</html>
Hoặc bạn muốn tạo một nút ấn, nếu ai muốn thì kích vào đó.
Code:
<STYLE>
@media all {
IE\:HOMEPAGE {behavior:url(#default#homepage)}
}
</STYLE>
<script>
function thietlapHomePage(){
oHomePage.setHomePage("http://www.svvn-dresden.org");
event.returnValue = false;
}
</SCRIPT>
</HEAD>
<BODY>
<IE:HOMEPAGE ID="oHomePage" />
<INPUT TYPE=button VALUE="Thiet Lap" onclick="thietlapHomePage()">
</BODY>
</HTML>
Sưu tầm
"Tìm hiểu Vũ trụ mênh mông huyền bí" www.bachkhoatrithuc.vn
|