HTML代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JS</title> <script rel="script" src="js1.js"></script>
第一种方法: <div ng-app=""> <div> <!--文本--> <input type="number" ng-model="A" placeholder=" 输入数字1"> {{a}}