<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue结合jquery</title>
<script src="https://code.jquery.com/jquery-3.4.1.js"
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
crossorigin="anonymous"></script>
<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
</head>
<body>
<div id = "computed_props">
千米 : <input type = "text" v-model = "kilometers" />
米 : <input type = "text" v-model = "meters" />
</div>
<button onclick="dodd()">ddd</button>
<script type = "text/javascript">
var vm = new Vue({
el: '#computed_props',
data: {
kilometers : 0,
meters:0
}
})
// console.log(vm.data);
function dodd(){
$.get("/menu/others",vm.$data,function(){
});
$.post("/menu/others",vm.$data,function(){
});
}
</script>
</body>
</html>
vue结合javascript
最新推荐文章于 2023-02-27 14:52:27 发布