当我点击菜单选项时,只有胆量页面,然后我的页面在页面上双击打印。如下所示
下面的是我的脚本
<head runat="server">
<title></title>
<script src="js/jquery-2.1.4.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<link type="text/css" rel="stylesheet" href="css/custom.css"/>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<%--Starts Gallry DataControl Binding--%>
<script type="text/javascript">
$(document).ready(function () {
success('');
$(document).on("click", "[id*=vNeck]", function () {
success('VNeck');
});
$(document).on("click", "[id*=uNeck]", function () {
success('UNeck');
});
$(document).on("click", "[id*=squareNeck]", function () {
success('SquareNeck');
});
$(document).on("click", "[id*=sweerHeart]", function () {
success('Sweatheart');
});
$(document).on("click", "[id*=boatNeck]", function () {
success('BoatNeck');
});
$(document).on("click", "[id*=hiNeck]", function () {
success('HiNeck');
});
$(document).on("click", "[id*=chineseCollar]", function () {
success('ChineseCollar');
});
$(document).on("click", "[id*=spaghetti]", function () {
success('Spaghetti');
});
$(document).on("click", "[id*=cropTop]", function () {
success('CropTop');
});
$(document).on("click", "[id*=halter]", function () {
success('Halter');
});
$(document).on("click", "[id*=sheerYoke]", function () {
success('SheerYoke');
});
});
function success(blouseType) {
$("#gvDetails").empty();
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "gallries.aspx/BindDatatable",
data: "{'blouseType':'" + blouseType + "'}",
dataType: "json",
success: function (data) {
var el = "<tr>";
for (var i = 0; i < data.d.length; i++) {
// var discript = data.d[i].FrontImage;
if (i % 3 == 0) {
el += "</tr><tr>"
}
var price = data.d[i].Price;
el += "<td style='padding:10px 40px 10px 40px'><div><a id='link" + data.d[i].ImageId + "' class='example-image-link' href='#myPopup' data-rel='popup' data-position-to='window' alt='LightBox'><img class='example-image' src=" + data.d[i].FrontImage + " width='150px' height='218px'/></a></div></br>";
el += "<span style='bottom: 6px;'><input id=check" + data.d[i].ImageId + " name='subscribe' type='checkbox' class='myCheck' value=''></input></span><div><label style='font-size: x-small;'>" + price + "</label></div><a href='http://www.google.co.in'><img src='images/pint.jpg' alt='' width='15' height='11'></a><a href='http://www.google.co.in'><img src='images/fb.png' alt='' width='15' height='11'></a><span id='imgId' class='gallImageIds' style='display: none;'>" + data.d[i].ImageId + "</span></td>";
$(document).on("click", "[id*=link" + data.d[i].ImageId + "]", function () {
var imageId = $(this).closest("td").find('#imgId').html();
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "gallries.aspx/BindImageInfo",
data: "{'imageId':'" + imageId + "'}",
dataType: "json",
success: function (popup) {
$("#ownerName").html(popup.d[0].OwnerName);
$("#designer").html(popup.d[0].DesignedBy);
$("#frontStyle").html(popup.d[0].FrontStyle);
$("#backStyle").html(popup.d[0].BackStyle);
$("#fabBody").html(popup.d[0].BodyFabric);
$("#fabSleeve").html(popup.d[0].SleeveFabric);
$("#fabYoke").html(popup.d[0].YokeFabric);
$("#fabColler").html(popup.d[0].CollerFabric);
$("#fabPrice").html(popup.d[0].Price);
$("#imgFront").attr("src", popup.d[0].FrontImage);
$("#imgBack").attr("src", popup.d[0].BackImage);
},
error: function (result) {
alert("Error");
}
});
});
}
el += '</tr>';
$("#gvDetails").append($(el));
},
error: function (result) {
alert("Error");
}
});
/*starts Checking ImageIds And check the CheckBoxes*/
var userIdCookie = getCookie('loggedUserId');
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
if (userIdCookie != null) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "gallries.aspx/favoriteData",
data: "{userLoggedInId : '" + userIdCookie + "'}",
dataType: "json",
success: function (checkBoxesData) {
for (var i = 0; i < checkBoxesData.d.length; i++) {
var GallryImageId = checkBoxesData.d[i].favoriteImageIds;
$(".gallImageIds").map(function () {
var spanImgId = $(this).text();
if (GallryImageId == spanImgId) {
$(this).closest('td').find('[type=checkbox]').prop('checked', true);
}
});
}
},
error: function (result) {
alert("Error");
}
});
/*Ends Checking ImageIds And check the CheckBoxes .get().join(",")*/
}
}
</script>
<%--Ends Gallry DataControl Binding--%>
<%--Starts Check Boxes Functions--%>
<script type="text/javascript">
</script>
<script type="text/javascript">
$(document).ready(function () {
$(document).on("change", "[class*=myCheck]", function () {
var userCookie = getCookie('loggedInUser');
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
var userIdCookie = getCookie('loggedUserId');
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
var imageId = $(this).closest("td").find('#imgId').html();
if (this.checked) {
if (userCookie != null) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "gallries.aspx/insertgalImage",
data: "{'imgId':'" + imageId + "','userId':'" + userIdCookie + "','methode':'insertion'}",
dataType: "json",
success: function (popup) {
alert(popup.d);
},
error: function (result) {
alert("Error");
}
});
}
else {
$('#modal_trigger')[0].click();
$(this).prop("checked", false);
}
}
else {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "gallries.aspx/insertgalImage",
data: "{'imgId':'" + imageId + "','userId':'" + userIdCookie + "','methode':'deletion'}",
dataType: "json",
success: function (popup) {
alert(popup.d);
},
error: function (result) {
alert("Error");
}
});
}
});
});
</script>
<%--Ends Check Boxes Functions--%>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"/>
<%--<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>--%>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<style type="text/css"> <style type="text/css">
.label
{
font-size:10px;
}
#test {
background-color: pink;
color: white;
float:left;
}
.leftImagesDiv
{
margin:15px;
}
h5
{
margin-left:40px;
}
#logoutDiv{
right:200px;
position:absolute;
top:-1px;
background-color: pink;
}
.logoutDivPTag
{
display:inline;
}
#logoutDiv
{
right:200px;
position:absolute;
top:-1px;
background-color: #F7B2DA;
}
</style>
<script src="js/jquery.leanModal.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
那么我不明白的问题是什么。请任何人都知道为什么会这样发生?