Tito Appgames
-
المساهمات
3 -
تاريخ الانضمام
-
تاريخ آخر زيارة
نوع المحتوى
ريادة الأعمال
البرمجة
التصميم
DevOps
التسويق والمبيعات
العمل الحر
البرامج والتطبيقات
آخر التحديثات
قصص نجاح
أسئلة وأجوبة
كتب
دورات
أجوبة بواسطة Tito Appgames
-
-
بتاريخ 3 ساعات قال Nagmar ناجمار:
أولا تستطيع التعريف عن متغير يحوي على مصفوفة , وتستعمل دالة Math.random للحصول على عنصر عشوائي من المصفوفة :
const items = ["www.google.com", "www.youtube.com", "www.facebook.com", "www.instagram.com"] var item = items[Math.floor(Math.random()*items.length)];
في هذه الحالة سيعيد لك في كل مرة رابط عشوائي ويمكنك إضافة العدد الذي تشائه من الروابط
شكرا اخي لكن لم اعرف كيف اطبقه هل يمكنك اعادة كتابة السكربت كامل اخي.
-
هذا سكربت يحول الزائر الى رابط معين كيف يمكن جعله في كل مرة يحول لرابط اخر مثلا اضع في السكربت 10 روابط في كل مرة يدخل زائر يحوله الى رابط عشوائيا
<html>
<head>
<script>
window.location.href = "www.yoursite.com";
</script>
</head>
</html>
تعديل علي سكربت
في أسئلة البرمجة
نشر
هذا سكربت يفتح اروابط في نافذة جديدة كيف اجعله يفتح في نفس النافذة؟