我有一个小网站,它已经完成了。我只是一个大四学生,它只是一个学习如何编码的项目。在所有编码的源计算机上,一切都完美无缺。然后我导出了文件并尝试了其他几台计算机。文件打开,一切看起来都不错,但五个HTML按钮中的两个不起作用。有这种情况发生的常见原因是什么?
答案 0 :(得分:0)
这是按钮
的java函数library(tidyr)
library(dplyr)
Industry_mean <- ann_returns %>%
gather(key=Firms,value=value,-Year) %>% #convert to long format
left_join(Firms_Ind) %>% #merge with firms_ind
group_by(Year,Industry) %>% #group as required
summarise(mean=mean(value)) %>% #calculate means
spread(key=Industry,value=mean) #convert back to wide format
Industry_mean
Year `1` `2` `3`
* <chr> <dbl> <dbl> <dbl>
1 y1 0.1766667 0.175 0.13
2 y2 0.1566667 0.125 0.03
3 y3 0.1866667 0.190 0.11
然后这是HTML按钮的自我
$('#createPassSubmit').click(function() {
var create = true;
var location = $('[name="reason"]').val();
var passnumber = $('#passnumber').val();
var note = $('[name="notes"]').val();
var student = $('#studentID').val();
var teacher = $('#teacherID').val();
var dataString = "CreatePass="+create+"&reason="+location+"¬es="+note+"&studentID="+student+"&teacherID="+teacher+"&passnumber="+passnumber;
$.ajax({
method: 'POST',
url: 'ajax.php',
data: dataString,
success: function(data) {
if(JSON.parse(data) === 'ERROR') {
alert("Pass " + passnumber + " is currently in use");
}
else {
$('#form input[type=text]').val('');
$("#form select").val('')
$('#sname').val('');
}
}
});
});
});