Javascript 当窗口宽度超过此值时,获取总弹出数据
这是我的任务 我想打印我的弹出数据,但这里我的问题是,我可以打印只有封面的弹出窗口(实际上我的弹出窗口比窗口大),但需要打印总的弹出数据。有人知道吗 这是我的代码(我从网上得到的) 和javascript:Javascript 当窗口宽度超过此值时,获取总弹出数据,javascript,html,css,angularjs,Javascript,Html,Css,Angularjs,这是我的任务 我想打印我的弹出数据,但这里我的问题是,我可以打印只有封面的弹出窗口(实际上我的弹出窗口比窗口大),但需要打印总的弹出数据。有人知道吗 这是我的代码(我从网上得到的) 和javascript: <script> function Quoter($scope) { $scope.clientName="TBC"; $scope.projectName="TBC"; $scope.templateNames=""; $scope.amou
<script>
function Quoter($scope) {
$scope.clientName="TBC";
$scope.projectName="TBC";
$scope.templateNames="";
$scope.amountOfTemplates=1;
$scope.timePerTemplate=4;
$scope.initialSetup=8;
$scope.javascript=10;
$scope.responsiveIncrease=35;
$scope.testingIncrease=30;
$scope.aaAccessibility=30;
$scope.standardTotal=function(){
var totSum=$scope.amountOfTemplates * $scope.timePerTemplate + $scope.initialSetup + $scope.javascript;
return totSum;
};
$scope.percentageOfTotal=function(){
var percent=Math.ceil($scope.responsiveIncrease/100 * $scope.standardTotal());
return percent;
};
$scope.sumResponsive= function() {
if($scope.responsiveBoolean){
var resHrs = Math.ceil($scope.responsiveIncrease/100 * $scope.standardTotal());
}else{
resHrs = 0;
}
return resHrs;
};
$scope.sumTesting= function() {
if($scope.testingBoolean){
var testHrs = Math.ceil($scope.testingIncrease/100 * $scope.standardTotal());
}else{
testHrs = 0;
}
return testHrs;
};
$scope.sumAccessibility= function() {
if($scope.aaAccessibilityBoolean){
var accessibilityHrs = Math.ceil($scope.aaAccessibility/100 * $scope.standardTotal());
}else{
accessibilityHrs = 0;
}
return accessibilityHrs;
};
$scope.total= function() {
var totComp = Math.ceil($scope.standardTotal() + $scope.sumResponsive() + $scope.sumTesting() + $scope.sumAccessibility());
return totComp;
};
$scope.removeTodo = function() {
$scope.todos.pop();
};
$scope.addTodo = function() {
$scope.todos.push({text:$scope.todoText, done:false});
$scope.todoText = '';
};
//$scope.nameTemplates = function() {
// if(templateNames!=""){
// alert("true");
//}
//};
}
</script>
函数引用器($scope){
$scope.clientName=“待定”;
$scope.projectName=“待定”;
$scope.templateNames=“”;
$scope.amontoftemplates=1;
$scope.timePerTemplate=4;
$scope.initialSetup=8;
$scope.javascript=10;
$scope.responsiveIncrease=35;
$scope.testingIncrease=30;
$scope.aaAccessibility=30;
$scope.standardTotal=函数(){
var totSum=$scope.amountOfTemplates*$scope.timePerTemplate+$scope.initialSetup+$scope.javascript;
返回总和;
};
$scope.percentageOfTotal=函数(){
var percent=Math.ceil($scope.responsiveIncrease/100*$scope.standardTotal());
收益率;
};
$scope.sumResponsive=function(){
if($scope.responsiveBoolean){
var resHrs=Math.ceil($scope.responsiveIncrease/100*$scope.standardTotal());
}否则{
resHrs=0;
}
返回resHrs;
};
$scope.sumTesting=函数(){
if($scope.testingBoolean){
var testHrs=Math.ceil($scope.testingIncrease/100*$scope.standardTotal());
}否则{
testHrs=0;
}
返回测试小时数;
};
$scope.sumAccessibility=function(){
if($scope.aaAccessibilityBoolean){
var accessibilityHrs=Math.ceil($scope.aaAccessibility/100*$scope.standardTotal());
}否则{
可达性HRS=0;
}
返回可访问性;
};
$scope.total=函数(){
var totComp=Math.ceil($scope.standardTotal()+$scope.sumResponsive()+$scope.sumTesting()+$scope.sumAccessibility());
返回总公司;
};
$scope.removeTodo=函数(){
$scope.todos.pop();
};
$scope.addTodo=函数(){
$scope.todos.push({text:$scope.todoText,done:false});
$scope.todoText='';
};
//$scope.nameTemplates=函数(){
//如果(templateNames!=“”){
//警惕(“真实”);
//}
//};
}
打印方法在哪里定义?href=“javascript:window.print()”您可以在htmlI中看到此方法。我想您正在寻找如何在模式弹出窗口中打印内容?
@media print
{
.no-print { display: none; }
.print { display: block; }
}
<script>
function Quoter($scope) {
$scope.clientName="TBC";
$scope.projectName="TBC";
$scope.templateNames="";
$scope.amountOfTemplates=1;
$scope.timePerTemplate=4;
$scope.initialSetup=8;
$scope.javascript=10;
$scope.responsiveIncrease=35;
$scope.testingIncrease=30;
$scope.aaAccessibility=30;
$scope.standardTotal=function(){
var totSum=$scope.amountOfTemplates * $scope.timePerTemplate + $scope.initialSetup + $scope.javascript;
return totSum;
};
$scope.percentageOfTotal=function(){
var percent=Math.ceil($scope.responsiveIncrease/100 * $scope.standardTotal());
return percent;
};
$scope.sumResponsive= function() {
if($scope.responsiveBoolean){
var resHrs = Math.ceil($scope.responsiveIncrease/100 * $scope.standardTotal());
}else{
resHrs = 0;
}
return resHrs;
};
$scope.sumTesting= function() {
if($scope.testingBoolean){
var testHrs = Math.ceil($scope.testingIncrease/100 * $scope.standardTotal());
}else{
testHrs = 0;
}
return testHrs;
};
$scope.sumAccessibility= function() {
if($scope.aaAccessibilityBoolean){
var accessibilityHrs = Math.ceil($scope.aaAccessibility/100 * $scope.standardTotal());
}else{
accessibilityHrs = 0;
}
return accessibilityHrs;
};
$scope.total= function() {
var totComp = Math.ceil($scope.standardTotal() + $scope.sumResponsive() + $scope.sumTesting() + $scope.sumAccessibility());
return totComp;
};
$scope.removeTodo = function() {
$scope.todos.pop();
};
$scope.addTodo = function() {
$scope.todos.push({text:$scope.todoText, done:false});
$scope.todoText = '';
};
//$scope.nameTemplates = function() {
// if(templateNames!=""){
// alert("true");
//}
//};
}
</script>