我正在构建一个包含100个html页面的简单游戏,当您浏览页面时,页面上会出现一个随机选择的故事。到目前为止,游戏运行完美,但我想修改它,以便我可以将包含故事的javascript数组放在每个html页面可以调用的单个文件中,这样我就可以编辑一次故事并且不更新每次添加时都会有100页。
最初我的javascript位于"显示"内的每个页面上div硬编码。
编辑:我按照说明编辑了我的代码,但仍未显示。
继承我的html页面:
<html>
<head>
<link rel="stylesheet" type="text/css" href="layout.css">
<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="story.js"></script>
</head>
<body>
<div class="header">
</div>
<div class="display_wrapper">
<div class="left_display">
</div>
<div class="display">
</div>
<div class="right_display">
</div>
</div>
<div class="left_nav">
</div>
<div class="nav">
<center>
<input type="button" id="north" value="north" onclick="window.location.href = +Math.floor(Math.random()
* 101) +'.html';" /> <br />
<input type="button" id="west" value="west" onclick="window.location.href = +Math.floor(Math.random() *
101) +'.html';" />
<input type="button" id="east" value="east" onclick="window.location.href = +Math.floor(Math.random() *
101) +'.html';" /> <br />
<input type="button" id="south" value="south" onclick="window.location.href = +Math.floor(Math.random()
* 101) +'.html';" />
</center>
</div>
<div class="right_nav">
</div>
</body>
</html>
继承人我的javascript我要求:
var r_text = new Array ();
r_text[0] = "Nothings here, you should keep moving before something shows up though.";
r_text[1] = "Nothings here, you should keep moving before something shows up though.";
r_text[2] = "Nothings here, you should keep moving before something shows up though.";
r_text[3] = "You found a piece of crumbled paper on the ground. It stood out on the ground because of the
sharp contrast between the white of the paper and the red of the blood staining it. Desperate for any
clues leading out of this eerie town, you pick it up and smooth it out carefully as to not damage it
further. It reads as follows: 888 paces north, 636 paces east, 770 paces west, 946 paces west.. no end in
sight..";
r_text[4] = "You cant see anything, you dont hear anything, but a chill just shot down your spine and you
cant shake this deep feeling of uneasiness.";
r_text[5] = "A strange smell like that of a rotting corpse hits your nose. You should turn back.";
r_text[6] = "You look and look and even shout out if anyone can hear you and find nothing, but you cant
shake the feeling that youre being watched.";
r_text[7] = "You look and look and even shout out if anyone can hear you and find nothing, but you cant
shake the feeling that youre being watched.";
r_text[8] = "You walk down a street of decrep old buildings that all seem uninhabited. No one is around,
not even stray animals. For as far as you can see in every direction is nothing but more old ruined
buildings.";
r_text[9] = "You walk down a street of decrep old buildings that all seem uninhabited. No one is around,
not even stray animals. For as far as you can see in every direction is nothing but more old ruined
buildings.";
r_text[10] = "You walk down a street of decrep old buildings that all seem uninhabited. No one is around,
not even stray animals. For as far as you can see in every direction is nothing but more old ruined
buildings.";
r_text[11] = "You happen upon a building with an open doorway. The building looks stable enough to
explore so you walk up to the entrance. Near the doorway you find an old dusty sign with writing you cant
quite read on it. After dusting the sign off, you find out this build used to be the town's library. You
enter optimisitically thinking you'll find some clues on how to leave the acursed town, or what happened
to the inhabitants. <p>Carefully you explore the internal perimeter of the library to make sure theres
nothing inside waiting for you. Upon securing that there are no other living things in the library beside
yourself, you switch to your next goal: finding information. Searching for hours and hours through
hundreds of books taken randomly from just about every shelf you skim the contents of every book looking
for some scrap of useful information. From what you can gather the town's name is Innsmouth and it used
to be a thriving fishery and gold refinery but war and inbreeding dwindled the town's population to
nearly nothing. <p>Esoteric cults moved into the desolate town with promise of economic recovery through
prayer and converted most of the surviving population, though rumors were the conversions were mostly by
force. Articles of disappearances were the only other useful bits of information that could be called
recent but the last one was dated fifteen years ago. You slump down in your chair, sigh a great sigh,
then stretch your legs and stand up to go find the nearest window. Its almost dark. You decide to spend
the night in the library. During your final inspection of the place before going to sleep for anything
lurking, you find a book that seemed wholly out of place, it looked like an ancient tome, extradanarily
thick and fantasically decorated. The very look of it was sinister. <p>For a minute you debated whether
you should look through it, toss it out of the building or find a whole other building to sleep in for
the night. Ultimately you decide you came here for useful information and this is the only book in the
whole library that looks promising. Without picking it up, you stand near enough to read the title.. The
Necronomicon. Hesitantly, you pick the book up as if it were a venomous snake ready to strike at any
moment. Carefully you lay it on a nearby table and proceed to open the front cover.<p> You spend the
entire night pouring over the ancient tome until the light of day stings your over-strained dry eyes. The
only way to maintain your own sanity after reading the contents of The Necronomicon you resign yourself
to believing this was the Bible to the esoteric cults who took over Innsmouth and it is nothing more than
religious fanatic gobbilty-gook. The world in which you and every other person on this earth and the
world portrayed in The Necronomicon just CANT be the same one. You try and try to get some sleep but
every time you close your eyes one of the frightful monsters depicted in the Necronomicon came to the
front of your mind's eye. You decide it would be best to put away the tome and not touch it again, and
focus on resting up so you may try venturing out tomorrow morning to find a way out of this increasingly
freightening town.";
r_text[12] = "You feel like youve been walking for hours without finding anything useful, any people,
animals, or ways out of the town.";
r_text[13] = "you find an abandoned general store, through the windows it looks like there may be some
rations still inside. You try for the door but its baracaded by some fallen roof beams. After surveying
the area for anything lurking and confirming that you are alone within normal earshot, you take a large
chunk of fallen brick and break open an entrance through a large front window. The sound of the glass
breaking was the first sound youve heard in incountable hours. Your heart pounds and youre sure SOMETHING
lurking out there heard you and must be coming after you now. Youre first instinct is to hide. <p>You
hide behind a counter and scope out your surrounding fervently listening for the slightest little sound.
The sound of your own heart pounding makes it hard to hear anything else. Every time you think its ok to
move, you realize your freightened state of mind can make five minutes feels like hours, again and again
you stop yourself from moving. Hours pass by and you notice a distinct change in the sun's position from
the shadows sprawled out on the floor. Finally you decide its safe to venture out in search of rations
after one more survey of the inside of the store. Your efforts paid off in enough water to satisfy your
thirst and some old canned goods easily opened with tools also found in the shop you gladly chanced and
wolfed down. You decide to hold up in this store until youre fully recovered and resolved to venture out
in the town again to find a way out.";
r_text[14] = "while trying to find a suitable shelter for the soon-coming night, you walk up to a
building with an open doorway and peer inside. instantly a chill creeps down your spine. a glimpse of a
dusty sign catches your gaze and you quickly dust it off to read it. It reads: The Esoteric Order of
Dagon. This is one of the churches of the cult that took over the town and quite possibly caused the
town's mass dissertion.<p> After that terrifying realization gave way to the ability to control your
limbs again, you decide to run and find a different shelter as far away from this building as you can. ";
r_text[15] = "while walking around the town you notice most of the land appears to be flat and the
numerous old delatidated buildings made it very hard to see much more than a few hundred feet down a
single street at a time. All of a sudden you spot the first elevation youve see since youve arrived. You
race for it to try and gain a vantage point of any kind to figure out which direction to go. The
elevation turns out to be less than 10 feet high and gives almost no vantage point as your view is still
obstructed by all of the ancient tottering buildings. You need need to climb ontop of a roof to gain any
vantage. ";
r_text[16] = "during your time exploring the town you have noticed most of the roads have been unmarked
or had their street signs torn down with no remnant of the name left to be read. That fact is what made
this street before you stand out from all the other identical streets youve been walking up and down
endlessly. An intact street sign that read Main street. What luck! It doesnt matter which direction you
follow the street, Main should always lead to other streets that will allow you to LEAVE the town! <p>You
follow Main street for as far as your legs can take you day in and day out, only stopping during the
night to take shelter in nearby abandoned buildings, and looking for food and water. Weeks passed by and
still not a single change in the scenery could be found, no people, no animals, everything in bitter
unyielding silence. There seems to be no forseeable end to this street.";
r_text[17] = "the sun is high in the sky and heading toward dusk. it happens much quicker than it should
and light becomes scarce in this town with no electricity after the sun starts to come back down. This is
about the time I start looking for a shelter to stay the night in, preferably something with drinkable
water inside as the search for food was given up long ago. After trying three other houses on this street
I find one with a door I can pry open. Upon entering the house Im overcome with the stench of mold and
mildew, which mean there must be water somewhere. I decide to investigate. <p>Very silently I roam around
the house with nothing but a few sun spots to light my way. Its almost impossible to distinguish what
each room's original purpose was, there was no discernable kitchen or bathroom to be made out in such
little light without blindly groping in the dark to maybe find something that resembles a sink, toilet,
tub or exposed pipes, which was not something I was quite ignorant enough to do. Upon entering the next
room I hear something squish under my foot and feel a dampness. After walking a few more steps I discover
the entire floor is covered in less than an inch of water. I would imagine its rain water leaked through
the same holes in the walls and roof the sun spots are coming from, however, Ive been in this town for a
while now and Ive not once seen it rain. <p>I kneel down and cup my hands to scoop up some water. First I
feel the texture, is it slimy, sludgy, or sooty? Next I smell it, is it tainted or fresh rainwater? It
felt stagnant, not dirty but not necessarily fresh. It had been here a while for certain. The smell was
what threw me for a loop, it was distinctively salty, like ocean water. <p> Nonetheless, I couldnt drink
it.
I was however, curious as to how salty ocean water got into this house. But the quickly fading sunlight
was not enough to give a thurough investigation. On my way toward what I thought was the exit, I found a
staircase leading up I had not found earlier. The light seemed the be stronger upstairs, so I thought a
few minutes of sunlight would be worth a vantage point of the town from a second story window, and maybe
perhaps an easy-enough climb to a roof. <p>The stairs seemed sturdy enough but they creaked rather loudly
under my feet. I unconsciously held my breath as I walked up the stairs and exhaled when I could actually
see the second floor of the house, it wasnt brightly lit by any means but enough sun poured in from old
windows and holes in the roof to light the second floor well enough for it to be easily explored. The
smell of mildrew was stronger up here as well and I soon found the bottom of my shoes to be soaked.
Everything up here was wet, like a firehose had been taken to it. I instinctively head toward the most
brightly lit room, hoping for an open window. Peering in the doorway I find my open window!
<p>Unfortunately, the room is flooded with several inches of water and broken household objects litterly
the floor, poking up from the water like bones from a hastily-dug grave. I decide to check the other
rooms first. The second room I try has a closed door and it wont budge, it seems to be baracaded from the
other side. The next room is open but theres a large hole in the middle of the floor and it doesnt seem
to be stable enough to walk across to get to the nearest window. The first room is the best option.
-------------------------------------- ";
r_text[18] = "Nestled down in my shelter for the night, having made sure all was quiet and vacant before
attempting to fall asleep. Abruptly, in the dead of the night Im awakened by the croaking of frogs
outside. Up until this very moment I hadnt heard or seen so much as a living insect, let alone a frog.
This disturbed me greatly.";
r_text[19] = "saw a fishfrog creature";
r_text[20] = "saw a cultist group";
r_text[21] = "saw cthulhu";
r_text[22] = "hear noises";
r_text[23] = "chased by a cultist";
r_text[24] = "find cultist materials";
r_text[25] = "spot cultists or fishfrogs on devils reef";
r_text[26] = "chased by fishfrogs";
r_text[27] = "found an underground tunnel";
r_text[28] = "cthulhu dreams";
r_text[29] = "I hear strange spectral piping";
r_text[30] = "when i saw the people, or what i thought were people, i instantly shouted out to them to
get their attention. i wish i hadnt done that.";
r_text[31] = "a night of despair";
r_text[32] = "i thought it was a dream but it wasnt, how did I get here?";
r_text[33] = "going inside a church to investigate";
r_text[34] = "event 34";
r_text[35] = "event 35";
r_text[36] = "event 36";
r_text[37] = "event 37";
r_text[38] = "event 38";
r_text[39] = "event 39";
r_text[40] = "event 40";
r_text[41] = "event 41";
r_text[42] = "event 42";
r_text[43] = "event 43";
r_text[44] = "event 44";
r_text[45] = "event 45";
r_text[46] = "event 46";
r_text[47] = "event 47";
r_text[48] = "event 48";
r_text[49] = "event 49";
r_text[50] = "event 50";
var i = Math.floor(51*Math.random())
document.getElementsByClassName("display")[0].append( r_text[i] );
答案 0 :(得分:1)
链接标记不用于JavaScript。你想要这个标签:
<script type="text/javascript" src="whateverYourFileIsCalled.js"></script>
您的JS文件中不应包含任何脚本标记;它应该只是没有任何HTML的JavaScript。
答案 1 :(得分:0)
用脚本标记替换链接标记:
<script src="story.js"></script>
答案 2 :(得分:0)
无需在JavaScript文件中使用<script>
标记。 <script>
标记仅适用于HTML。
此外,您在HTML中包含的JS不是<rel>
而是<script>
,而是
<script src="story.js"></script>
答案 3 :(得分:0)
<link>
标记不用于Javascript,因此请删除该行。 div
标记可以完成这项工作。
接下来,删除<script>
文件中的story.js
标记(它是Javascript,而不是HTML)。
该文件的内容应该只是:
var r_text = new Array ();
r_text[0] = "Nothings here, you should keep moving before something shows up though.";
r_text[1] = "Nothings here, you should keep moving before something shows up though.";
r_text[2] = "Nothings here, you should keep moving before something shows up though.";
r_text[3] = "You found a piece of crumbled paper on the ground. It stood out on the ground because of the
sharp contrast between the white of the paper and the red of the blood staining it. Desperate for any
clues leading out of this eerie town, you pick it up and smooth it out carefully as to not damage it
further. It reads as follows: 888 paces north, 636 paces east, 770 paces west, 946 paces west.. no end in
sight..";
r_text[4] = "You cant see anything, you dont hear anything, but a chill just shot down your spine and you
cant shake this deep feeling of uneasiness.";
r_text[5] = "A strange smell like that of a rotting corpse hits your nose. You should turn back.";
r_text[6] = "You look and look and even shout out if anyone can hear you and find nothing, but you cant
shake the feeling that youre being watched.";
r_text[7] = "You look and look and even shout out if anyone can hear you and find nothing, but you cant
shake the feeling that youre being watched.";
r_text[8] = "You walk down a street of decrep old buildings that all seem uninhabited. No one is around,
not even stray animals. For as far as you can see in every direction is nothing but more old ruined
buildings.";
r_text[9] = "You walk down a street of decrep old buildings that all seem uninhabited. No one is around,
not even stray animals. For as far as you can see in every direction is nothing but more old ruined
buildings.";
r_text[10] = "You walk down a street of decrep old buildings that all seem uninhabited. No one is around,
not even stray animals. For as far as you can see in every direction is nothing but more old ruined
buildings.";
r_text[11] = "You happen upon a building with an open doorway. The building looks stable enough to
explore so you walk up to the entrance. Near the doorway you find an old dusty sign with writing you cant
quite read on it. After dusting the sign off, you find out this build used to be the town's library. You
enter optimisitically thinking you'll find some clues on how to leave the acursed town, or what happened
to the inhabitants. <p>Carefully you explore the internal perimeter of the library to make sure theres
nothing inside waiting for you. Upon securing that there are no other living things in the library beside
yourself, you switch to your next goal: finding information. Searching for hours and hours through
hundreds of books taken randomly from just about every shelf you skim the contents of every book looking
for some scrap of useful information. From what you can gather the town's name is Innsmouth and it used
to be a thriving fishery and gold refinery but war and inbreeding dwindled the town's population to
nearly nothing. <p>Esoteric cults moved into the desolate town with promise of economic recovery through
prayer and converted most of the surviving population, though rumors were the conversions were mostly by
force. Articles of disappearances were the only other useful bits of information that could be called
recent but the last one was dated fifteen years ago. You slump down in your chair, sigh a great sigh,
then stretch your legs and stand up to go find the nearest window. Its almost dark. You decide to spend
the night in the library. During your final inspection of the place before going to sleep for anything
lurking, you find a book that seemed wholly out of place, it looked like an ancient tome, extradanarily
thick and fantasically decorated. The very look of it was sinister. <p>For a minute you debated whether
you should look through it, toss it out of the building or find a whole other building to sleep in for
the night. Ultimately you decide you came here for useful information and this is the only book in the
whole library that looks promising. Without picking it up, you stand near enough to read the title.. The
Necronomicon. Hesitantly, you pick the book up as if it were a venomous snake ready to strike at any
moment. Carefully you lay it on a nearby table and proceed to open the front cover.<p> You spend the
entire night pouring over the ancient tome until the light of day stings your over-strained dry eyes. The
only way to maintain your own sanity after reading the contents of The Necronomicon you resign yourself
to believing this was the Bible to the esoteric cults who took over Innsmouth and it is nothing more than
religious fanatic gobbilty-gook. The world in which you and every other person on this earth and the
world portrayed in The Necronomicon just CANT be the same one. You try and try to get some sleep but
every time you close your eyes one of the frightful monsters depicted in the Necronomicon came to the
front of your mind's eye. You decide it would be best to put away the tome and not touch it again, and
focus on resting up so you may try venturing out tomorrow morning to find a way out of this increasingly
freightening town.";
r_text[12] = "You feel like youve been walking for hours without finding anything useful, any people,
animals, or ways out of the town.";
r_text[13] = "you find an abandoned general store, through the windows it looks like there may be some
rations still inside. You try for the door but its baracaded by some fallen roof beams. After surveying
the area for anything lurking and confirming that you are alone within normal earshot, you take a large
chunk of fallen brick and break open an entrance through a large front window. The sound of the glass
breaking was the first sound youve heard in incountable hours. Your heart pounds and youre sure SOMETHING
lurking out there heard you and must be coming after you now. Youre first instinct is to hide. <p>You
hide behind a counter and scope out your surrounding fervently listening for the slightest little sound.
The sound of your own heart pounding makes it hard to hear anything else. Every time you think its ok to
move, you realize your freightened state of mind can make five minutes feels like hours, again and again
you stop yourself from moving. Hours pass by and you notice a distinct change in the sun's position from
the shadows sprawled out on the floor. Finally you decide its safe to venture out in search of rations
after one more survey of the inside of the store. Your efforts paid off in enough water to satisfy your
thirst and some old canned goods easily opened with tools also found in the shop you gladly chanced and
wolfed down. You decide to hold up in this store until youre fully recovered and resolved to venture out
in the town again to find a way out.";
r_text[14] = "while trying to find a suitable shelter for the soon-coming night, you walk up to a
building with an open doorway and peer inside. instantly a chill creeps down your spine. a glimpse of a
dusty sign catches your gaze and you quickly dust it off to read it. It reads: The Esoteric Order of
Dagon. This is one of the churches of the cult that took over the town and quite possibly caused the
town's mass dissertion.<p> After that terrifying realization gave way to the ability to control your
limbs again, you decide to run and find a different shelter as far away from this building as you can. ";
r_text[15] = "while walking around the town you notice most of the land appears to be flat and the
numerous old delatidated buildings made it very hard to see much more than a few hundred feet down a
single street at a time. All of a sudden you spot the first elevation youve see since youve arrived. You
race for it to try and gain a vantage point of any kind to figure out which direction to go. The
elevation turns out to be less than 10 feet high and gives almost no vantage point as your view is still
obstructed by all of the ancient tottering buildings. You need need to climb ontop of a roof to gain any
vantage. ";
r_text[16] = "during your time exploring the town you have noticed most of the roads have been unmarked
or had their street signs torn down with no remnant of the name left to be read. That fact is what made
this street before you stand out from all the other identical streets youve been walking up and down
endlessly. An intact street sign that read Main street. What luck! It doesnt matter which direction you
follow the street, Main should always lead to other streets that will allow you to LEAVE the town! <p>You
follow Main street for as far as your legs can take you day in and day out, only stopping during the
night to take shelter in nearby abandoned buildings, and looking for food and water. Weeks passed by and
still not a single change in the scenery could be found, no people, no animals, everything in bitter
unyielding silence. There seems to be no forseeable end to this street.";
r_text[17] = "the sun is high in the sky and heading toward dusk. it happens much quicker than it should
and light becomes scarce in this town with no electricity after the sun starts to come back down. This is
about the time I start looking for a shelter to stay the night in, preferably something with drinkable
water inside as the search for food was given up long ago. After trying three other houses on this street
I find one with a door I can pry open. Upon entering the house Im overcome with the stench of mold and
mildew, which mean there must be water somewhere. I decide to investigate. <p>Very silently I roam around
the house with nothing but a few sun spots to light my way. Its almost impossible to distinguish what
each room's original purpose was, there was no discernable kitchen or bathroom to be made out in such
little light without blindly groping in the dark to maybe find something that resembles a sink, toilet,
tub or exposed pipes, which was not something I was quite ignorant enough to do. Upon entering the next
room I hear something squish under my foot and feel a dampness. After walking a few more steps I discover
the entire floor is covered in less than an inch of water. I would imagine its rain water leaked through
the same holes in the walls and roof the sun spots are coming from, however, Ive been in this town for a
while now and Ive not once seen it rain. <p>I kneel down and cup my hands to scoop up some water. First I
feel the texture, is it slimy, sludgy, or sooty? Next I smell it, is it tainted or fresh rainwater? It
felt stagnant, not dirty but not necessarily fresh. It had been here a while for certain. The smell was
what threw me for a loop, it was distinctively salty, like ocean water. <p> Nonetheless, I couldnt drink
it.
I was however, curious as to how salty ocean water got into this house. But the quickly fading sunlight
was not enough to give a thurough investigation. On my way toward what I thought was the exit, I found a
staircase leading up I had not found earlier. The light seemed the be stronger upstairs, so I thought a
few minutes of sunlight would be worth a vantage point of the town from a second story window, and maybe
perhaps an easy-enough climb to a roof. <p>The stairs seemed sturdy enough but they creaked rather loudly
under my feet. I unconsciously held my breath as I walked up the stairs and exhaled when I could actually
see the second floor of the house, it wasnt brightly lit by any means but enough sun poured in from old
windows and holes in the roof to light the second floor well enough for it to be easily explored. The
smell of mildrew was stronger up here as well and I soon found the bottom of my shoes to be soaked.
Everything up here was wet, like a firehose had been taken to it. I instinctively head toward the most
brightly lit room, hoping for an open window. Peering in the doorway I find my open window!
<p>Unfortunately, the room is flooded with several inches of water and broken household objects litterly
the floor, poking up from the water like bones from a hastily-dug grave. I decide to check the other
rooms first. The second room I try has a closed door and it wont budge, it seems to be baracaded from the
other side. The next room is open but theres a large hole in the middle of the floor and it doesnt seem
to be stable enough to walk across to get to the nearest window. The first room is the best option.
-------------------------------------- ";
r_text[18] = "Nestled down in my shelter for the night, having made sure all was quiet and vacant before
attempting to fall asleep. Abruptly, in the dead of the night Im awakened by the croaking of frogs
outside. Up until this very moment I hadnt heard or seen so much as a living insect, let alone a frog.
This disturbed me greatly.";
r_text[19] = "saw a fishfrog creature";
r_text[20] = "saw a cultist group";
r_text[21] = "saw cthulhu";
r_text[22] = "hear noises";
r_text[23] = "chased by a cultist";
r_text[24] = "find cultist materials";
r_text[25] = "spot cultists or fishfrogs on devils reef";
r_text[26] = "chased by fishfrogs";
r_text[27] = "found an underground tunnel";
r_text[28] = "cthulhu dreams";
r_text[29] = "I hear strange spectral piping";
r_text[30] = "when i saw the people, or what i thought were people, i instantly shouted out to them to
get their attention. i wish i hadnt done that.";
r_text[31] = "a night of despair";
r_text[32] = "i thought it was a dream but it wasnt, how did I get here?";
r_text[33] = "going inside a church to investigate";
r_text[34] = "event 34";
r_text[35] = "event 35";
r_text[36] = "event 36";
r_text[37] = "event 37";
r_text[38] = "event 38";
r_text[39] = "event 39";
r_text[40] = "event 40";
r_text[41] = "event 41";
r_text[42] = "event 42";
r_text[43] = "event 43";
r_text[44] = "event 44";
r_text[45] = "event 45";
r_text[46] = "event 46";
r_text[47] = "event 47";
r_text[48] = "event 48";
r_text[49] = "event 49";
r_text[50] = "event 50";
var i = Math.floor(51*Math.random())
document.write( r_text[i] );