var StudentSGUID = $("ListBoxStudent").value;
var StudentIndex = $("ListBoxStudent").selectedIndex;
var SubjectIndex = $("ListBoxSubject").selectedIndex;
Callback1.Callback(StudentSGUID,StudentIndex,SubjectIndex);
if (SubjectIndex != $("ListBoxSubject").length - 1)
{
$("ListBoxSubject").selectedIndex = eval(SubjectIndex) + 1 ;
//$("ListBoxSubject").focus();
document.getElementById("ListBoxSubject").focus();
}
else
{
$("ListBoxStudent").selectedIndex = eval(StudentIndex) + 1;
//$("ListBoxStudent").focus();
document.getElementById("ListBoxStudent").focus();
}
var StudentIndex = $("ListBoxStudent").selectedIndex;
var SubjectIndex = $("ListBoxSubject").selectedIndex;
Callback1.Callback(StudentSGUID,StudentIndex,SubjectIndex);
if (SubjectIndex != $("ListBoxSubject").length - 1)
{
$("ListBoxSubject").selectedIndex = eval(SubjectIndex) + 1 ;
//$("ListBoxSubject").focus();
document.getElementById("ListBoxSubject").focus();
}
else
{
$("ListBoxStudent").selectedIndex = eval(StudentIndex) + 1;
//$("ListBoxStudent").focus();
document.getElementById("ListBoxStudent").focus();
}
一般都是用$("#ListBoxStudent")取值把
{
string lpSGUID = this.TextBoxSGUID.Value;
string sImageURL = Server.MapPath("~/Temp/" + lpSGUID + ".JPG");
File.Delete(sImageURL);
if (this.FileUpload1.FileName != "")
{
try
{
this.FileUpload1.SaveAs(sImageURL);
this.Image1.ImageUrl = "~/Temp/" + lpSGUID + ".JPG";
this.ImageURL.Value = sImageURL;
}
catch
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "Cscript", "<script for=window event=onload>window.alert('图片文件上传失败!');</script>");
return;
}
}
else
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "Cscript", "<script for=window event=onload>window.alert('请先选择图片文件!');</script>");
return;
}
}
图片怎么查看不出来 求高手!!!
换成
this.Image1.ImageUrl = sImageURL;
我这样取值
var StudentSGUID = $("ListBoxStudent").value;
var StudentIndex = $("ListBoxStudent").selectedIndex; var SubjectIndex = $("ListBoxSubject").selectedIndex;
// var StudentIndex=document.getElementById("<%= ListBoxStudent.ClientID %>").selectedIndex;//
// alert(StudentIndex);
// var SubjectIndex=document.getElementById("<%= ListBoxSubject.ClientID %>").selectedIndex;//
if (SubjectIndex != $("ListBoxSubject").length -1 )
{
//$("ListBoxSubject").focus();
document.getElementById("<%= ListBoxStudent.ClientID %>").focus();
$("ListBoxSubject").selectedIndex = eval(SubjectIndex) + 1 ;
}
else
{
//$("ListBoxStudent").focus();
document.getElementById("<%= ListBoxStudent.ClientID %>").focus();
$("ListBoxStudent").selectedIndex = eval(StudentIndex) + 1;
//$("ListBoxSubject").selectedIndex = 0;
}
Callback1.Callback(StudentSGUID,StudentIndex,SubjectIndex);