1. jQuery html <!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> </head> <body> <script> $(document).ready(function(){ $("#myButton").click(function(){ }); }); </script> </body> </html> 2. React html <!DOCTYPE html> <html> <head> <script src="https://cdn.jsdelivr.net/npm/react@17.0.2/umd/react.production.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/react-dom@17.0.2/umd/react-dom.production.min.js"></script> </head> <body> <div id="root"></div> <script> const element = React.createElement('h1', null, 'Hello, React!'); ReactDOM.render(element, document.getElementById('root')); </script> </body> </html> 3. AngularJS html <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script> </head> <body> <div ng-app=""> <input type="text" ng-model="name"> <h1>Hello, {{name}}</h1> </div> </body> </html>


上一篇:
下一篇:
切换中文