<html lang="de">
<head>
<meta name="description" content="Tuts.de Hilfe" />
<!-- CSS -->
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.no-icons.min.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome-ie7.min.css" rel="stylesheet">
<link href="http://fonts.googleapis.com/css?family=Titillium+Web:400,300,600,700" rel="stylesheet" type="text/css">
<!-- Javascript -->
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<title>Bootstrap Template</title>
</head>
<body>
<!-- Help Area-->
<nav class="navbar navbar-default navbar-top" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="#">Help:</a>
</div>
<ul class="nav navbar-nav">
<li><a href="http://www.getbootstrap.com" target="_blank">Bootstrap</a></li>
<li><a href="http://fontawesome.io/icons/" target="_blank">Font Awesome</a></li>
</ul>
</nav>
<div class="value">1234</div>
<form method="post" action="">
Frage 1:
<input type="radio" class="1" name="angabe1" value="0 , ja" /> Ja
<input type="radio" class="1" name="angabe2" value="25 , nein" /> Nein
</form>
<input class="valOut" />
</body>
</html>
$(function(){
var value = $('.value').html(); //holt sich die Startzahl
$('input:radio').on('click', function() { // Überwacht das klicken auf die Radiobuttons
var valueRadio = $(this).val(), //speichert das value des Radiobuttons
subvalue = valueRadio.split(' , '), // Teilt den Value String am Komma in ein Array (subvalue[0], subvalue[1], … )
myInteger = parseInt(subvalue[0]); // macht aus dem String einen Integerwert
if(myInteger === 0){ //wenn myInteger ist 0
$('.valOut').val(value *25/100); //Schreibt die Startzahl als value in das Inputfeld
}
else if(myInteger === 25){ //wenn myInteger ist 25
$('.valOut').val(value); //Schreibt die Startzahl als value in das Inputfeld
}
});
});
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |