1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- showtooltipPhoto = false; //默认提示不显示
- /**提示 */
- function tooltip(file,type){
- //页面层
- title = '提示信息';
- switch (type) {
- case 1:
- title="圖形提示";
- break;
- case 2:
- title="文字提示";
- break;
- default:
- title="文字提示";
- break;
- }
- var filename = "img/"+file;
- var img = new Image();
- img.src = filename;
- img.onload = function() {
- var html = "<div><img style='width:100%' src='"+filename+"'/> </div>";
- var width = window.screen.width;
- var imgwidth = img.width;
- if(width<imgwidth){
- imgwidth = width;
- }else{
- imgwidth += 20;
- }
- layer.open({
- type: 1,
- content: html,
- area: [imgwidth+'px', img.height+60+'px'],
- title:title,
- });
- };
- }
- /**图片提示 */
- function tooltipPhoto(){
- showtooltipPhoto =!showtooltipPhoto;
- if(showtooltipPhoto){
- document.getElementById("blank").style.visibility="hidden";
- document.getElementById("tooltipPhoto").style.display="inline";
- document.getElementById("right-item").style.visibility="hidden";
- document.getElementById("left-item").style.visibility="hidden";
- }else{
- document.getElementById("blank").style.visibility="visible";
- document.getElementById("tooltipPhoto").style.display="none";
- document.getElementById("right-item").style.visibility="visible";
- document.getElementById("left-item").style.visibility="visible";
- }
- }
- /**回答问题 */
- function checkAns2(){
- if(showtooltipPhoto){
- tooltipPhoto();
- }
- document.getElementById("tooltip1").style.display="none";
- document.getElementById("tooltip2").style.display="none";
- checkAns(612)
- }
- /**转图片 */
- function rotatePic2(top,bottom,value,direction){
- if(showtooltipPhoto){
- tooltipPhoto();
- }
- rotatePic(top,bottom,value,direction)
- }
- /**回答问题 */
- function checkCorrect2(callback){
- document.getElementById("checkButton29").style.visibility="hidden";
- document.getElementById("tooltip1").style.visibility="hidden";
- document.getElementById("tooltip2").style.visibility="hidden";
- if(showtooltipPhoto){
- tooltipPhoto();
- }
- callback();
- }
|