You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/IoTCenter/Views/Home/Node.cshtml

25 lines
802 B

@model Node
<div id="template"></div>
@section scripts{
<script>
$(function () {
$.ajaxSetup({
cache: false
});
var url = '/@Model.Template?number=' + new URI().query(true).number+'&_=' + Date.now();
axios.get(url)
.then(function (response) {
var html = response.data;
$(html).each(function (i, n) {
if (n.tagName === 'STYLE') {
$('head').append(n);
}
});
$('#template').html(html);
})
.catch(function (error) {
alert(error, '警告', function () { })
});
});
</script>
}