MediaWiki:Zerospace EN.js: Difference between revisions
Jump to navigation
Jump to search
(Created page with "$(function () { var myElement = document.getElementById('mw-mywiki-example'); myElement.innerHTML = 'any HTML'; }());") |
No edit summary |
||
Line 5: | Line 5: | ||
}()); | }()); | ||
/** | |||
* Generates a random alien. | |||
* | |||
* @access public | |||
* @return string $random_alien Random alien | |||
*/ | |||
function generate_alien() | |||
{ | |||
$random_alien = ''; | |||
$dice_size = 6; | |||
srand((double)microtime()*1000000); | |||
$random_alien = rand(1, $dice_size); | |||
return $random_alien; | |||
} |
Revision as of 12:48, 25 April 2018
$(function () {
var myElement = document.getElementById('mw-mywiki-example');
myElement.innerHTML = 'any HTML';
}());
/**
* Generates a random alien.
*
* @access public
* @return string $random_alien Random alien
*/
function generate_alien()
{
$random_alien = '';
$dice_size = 6;
srand((double)microtime()*1000000);
$random_alien = rand(1, $dice_size);
return $random_alien;
}