Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Javascript call"
Bootstrap 3.0.0 Snippet by
Nirmaan
3.0.0
Preview
HTML
JS
View Full Screen
Fork
Fork this
2.2K
 
0 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <html> <head> <meta charset="ISO-8859-1"> <title>Form Generator</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> <script src="script.js"></script> </head> <body ng-app="mymodule" ng-controller="mycontroller"> <br><br> <div class="container-fluid"> <div class="row"> <div class="col-md-2"> <div id="toolbox" style="border: 2px solid red;" align="center"><p></p> <input type="submit" value="Text" data-toggle="modal" data-target="#myModal"> <br><br> <input type="submit" value="Multiple Radio" data-toggle="modal" data-target="#radioModal"> <br><br> </div> </div> <!-- Modal --> <div class="modal fade" id="myModal" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Modal Header</h4> </div> <form name="myform" > <div ng-app="" class="modal-body"> Label name:<input type="text" placeholder="Enter label name" ng-model="name" required/><p></p> </div> <div class="modal-footer"> <button type="button" class="btn btn-warning" data-dismiss="modal" ng-model="text" ng-click="text = true">Submit</button> </div> </form> </div> </div> </div> <!-- Radio Modal --> <div class="modal fade" id="radioModal" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Modal Header</h4> </div> <div class="form-group"> <form class="form-horizontal" name="myform" > <div ng-app="" ng-init="" class="modal-body"> Label name: <input type="text" placeholder="Enter label name" ng-model="labelName" required/><p></p> Values: <input type="text" placeholder="Enter label name" ng-model="noOfValues" required/><input type="button" ng-model="addText" ng-click="addText = true" value="+"/><p></p> <input type="text" ng-if="addText"/> </div> <div class="modal-footer"> <button type="button" class="btn btn-warning" data-dismiss="modal" ng-model="text" ng-click="text = true">Submit</button> </div> </form> </div> </div> </div> </div> <div class="col-md-10" style="border:2px solid black;"> <p></p> <div ng-if="text" > {{name}} <input type="text" > <br><br> </div> <div ng-if="radio"> <input type="radio" value="Male" >Male<br/> <input type="radio" value="Male" >Male<br/> <input type="radio" value="Male" >Male<br/> <br><br> </div> </div> </div> </div> </body> </html> <script type="text/javascript"> window.onload = function() { if(document.getElementById('number1').checked) { var h1 = document.createElement("h1"); h1.appendChild(document.createTextNode("Hello member")); document.getElementById("XXX").appendChild(h1); } } </script> <script type="text/javascript"> var myApp = angular.module('myApp', []); myApp.factory('myService', function() { return { foo: function() { alert("I'm foo!"); } }; }); myApp.controller('MainCtrl', ['$scope', 'myService', function($scope, myService) { $scope.callFoo = function() { myService.foo(); } }]); </script> <!-- <body ng-controller="MainCtrl"> <button ng-click="callFoo()">Call foo</button> -->
var app = angular.module("mymodule",[]).controller("mycontroller",function($scope){ });
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76