mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 00:34:00 -06:00
Random names and rolls working.
This commit is contained in:
+2
-19
@@ -21,8 +21,8 @@ input, button { display: inline; }
|
||||
|
||||
<div class="hbox">
|
||||
Name
|
||||
<input id=Name>
|
||||
<button id=RandomName>?</button>
|
||||
<input id="Name">
|
||||
<button id="RandomName">?</button>
|
||||
</div>
|
||||
|
||||
<div class=hbox>
|
||||
@@ -68,22 +68,5 @@ input, button { display: inline; }
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function fill(e, a, n) {
|
||||
var def = Random(a.length);
|
||||
for (var i = 0; i < a.length; ++i) {
|
||||
var v = a[i].split("|")[0];
|
||||
var check = def == i ? " checked " : " ";
|
||||
$("<div><input type=radio name=\"" + n + "\" value=\"" + v + "\" " +
|
||||
check +">" + v + "</div>").appendTo(e);
|
||||
}
|
||||
}
|
||||
fill("#races", K.Races, "Race");
|
||||
fill("#classes", K.Klasses, "Class");
|
||||
|
||||
|
||||
//$(document).ready(function(){});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user