-
السلام عليكم
موقعنا الاروقة العربية لايظهر للزائر كما صمم اذا كان الزائر يستعمل اكسبلورر الاصدار الرابع او سندباد. لذا ارجو من الاخوة العارفين بجافا ارشادي الى سكربت صغير يقوم بما يلي:
ـ يفحص مستعرض الزائر واذا وجد انه اكسبلورر الخامس لا يفعل شيئا.
ـ اذا وجد ان مستعرض الزائر هو اكسبلورر الرابع او سندباد يعطي للزائر رسالة تفيد ان افضل برنامج لاستعراض الموقع هو اكسبلورر الخامس ويعطيه اختيارين الاول الاستمرار والثاني اغلاق النافذه او الرجوع الى الوراء ان كان اتيا من موقع اخر.
مع الشكر
-
السلام وعليكم...
اخي علاء الدين...هذا هو الكود..بعد فحص متصفح الزائر يقوم بتحويله
تلقائيا بما يناسب متصفحه...
<BLOCKQUOTE> <font> كود: </font> <div align="ltr"> <center> <table border="0" width="80%" dir="ltr" bgcolor=="#000000"> <tr> <td width="100%"> <pre> <font color="#ffffff"> <!-- This script has been in the http://www.javascripts.com Javascript Public Library! -->
<!-- Note that though this material may have been in a public depository, certain author copyright restrictions may apply. -->
<html>
<head>
<title>Regcognizer_may_15</title>
<SCRIPT LANGUAGE="JavaScript">
// just few things which I collect and put together
// regocnize IE, NC, Mac, opera.
// purpose to use it as index.htm, modification made by EsaS
// be free copy and share it around of your friends. Please don't remove line above.
// by that line I can recognize, where you got it!
function splitString (stringToSplit,separator)
{
arrayOfStrings = stringToSplit.split(separator)
}
function Is ()
{
var agt=navigator.userAgent.toLowerCase()
this.major = parseInt(navigator.appVersion)
this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)))
this.nav2 = (this.nav && (this.major == 2))
this.nav3 = (this.nav && (this.major == 3))
this.nav4 = (this.nav && (this.major == 4))
this.nav4up = this.nav && (this.major >= 4)
this.navonly = (this.nav && (agt.indexOf(";nav") != -1))
this.ie = (agt.indexOf("msie") != -1)
this.ie3 = (this.ie && (this.major == 2))
this.ie4 = (agt.indexOf("4.0") != -1)
this.ie5 = (agt.indexOf("5.0") != -1)
this.ie4up = this.ie && (this.major >= 4)
this.opera = (agt.indexOf("opera") != -1)
this.minor = parseFloat(navigator.appVersion)
if (this.ie)
{
var spacer="msie "
splitString(agt,spacer)
this.minor = parseFloat(arrayOfStrings[1])
}
}
var is;
var isIE3Mac = false;
if ((navigator.appVersion.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1) && (parseInt(navigator.appVersion)==3))
isIE3Mac = true;
else
is = new Is();
// -->
</SCRIPT>
</head>
<body bgcolor="#400040" text="#ffffff" link="#00ff00" vlink="#8080ff" alink="#ff0000">
<BR>
<pre>
<center> <h2><font color=#80ffff>Welcome </font></h2>
<!--img SRC="./kuvat/LL_logo2.jpg" HSPACE=270 VSPACE=20 height=100 width=220-->
<h3><font color=#80ff80>to my site!</font>
</h3>
Recognizing browser, after little delay, you shall moved
to page which are the best for your browser!</center>
</pre>
<SCRIPT LANGUAGE="JavaScript">
<!--
pause_time = 6000; // 6 seconds
NC4_page="./indexNC4.html";
NC3_page="./indexNC3.html";
NC2_page="./indexNC2.html";
IE5_page="./indexIE5.html";
IE4_page="./indexIE4.html";
IE3_page="./indexIE3.html";
Op_page="./indexOP3.html";
txt_page="./indextxt.html";
function open_NCWindow(win1)
{
mywin=window.open("./indexNC4.html","win10",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable =0,width=750,height=420');
}
// IE perhaps dont find lines above, so use nex row, to call page, which you want to view
// window.location.href = IE5_page
if (isIE3Mac){
document.write ("<center>You are using Internet Explorer 3 for Mac<BR></center>")
setTimeout('window.location.href = Mc3_page;',pause_time)
}
else {
if (is.nav)
document.write("<center>You are using Netscape ")
if (is.nav2){
document.write(" 2.<BR></center>")
setTimeout('window.location.href = NC2_page;',pause_time)
}
if (is.nav3){
document.write(" 3.<BR></center>")
setTimeout('window.location.href = NC3_page;',pause_time)
}
if (is.nav4up)
{
document.write(" 4.<BR></center>")
setTimeout('url = open_NCWindow();',pause_time)
// this call function which shall open new window
}
if (is.ie){
document.write("<center>You are using Internet Explorer ")
}
if (is.ie3){
document.write(" 3.<BR></center>")
setTimeout('window.location.href = IE3_page;',pause_time)
}
if (is.ie4 && is.ie5){
document.write(" 5.<BR></center>")
setTimeout('window.location.href = IE5_page;',pause_time)
}
if (is.ie4 && is.ie5 == -1){
document.write(" 4.<BR></center>")
setTimeout('window.location.href = IE4_page;',pause_time)
}
if (is.opera){
document.write("<center><P>You are using Operaa<BR></center>")
setTimeout('window.location.href = Op_page;',pause_time)
}
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (isIE3Mac)
document.write ("<center>You are using Internet Explorer 3 for Mac:lla.<BR></center>")
else {
document.write("<center><TT>Mozilla Version : " + is.major + "</TT><BR></center>")
document.write("<center><TT>Browser Version : " + is.minor + "</TT><BR></center>")
}
//-->
</SCRIPT>
<pre><center>
This site is <font color=#ffff80>designed </font> for <font color=#ffff80>NETSCAPE COMMUNICATOR 4.0</font> and newér versions.
</center>
</body>
</html>
<!-- Simba says Roar. --> </font> </pre> </td> </tr> </table> </center> </div> </BLOCKQUOTE>
تستطيع ترجمته وتغييره ببساطه الى ما يناسبك..اعذرني فلم اجد الوقت
والا كنت اعطيتك اياه معرب وجاهز..
تحياتي
-
السلام عليكم
شكرا اخي الكريم انني بصدد تجربة السكربت.
ضوابط المشاركة
- لا تستطيع إضافة مواضيع جديدة
- لا تستطيع الرد على المواضيع
- لا تستطيع إرفاق ملفات
- لا تستطيع تعديل مشاركاتك
-
قوانين المنتدى
أضف موقعك هنا |
اضافة محتوى فريد لموقعك