日期:2014-05-16 浏览次数:20430 次
public string s;//////////
protected void Page_Load(object sender,EventArgs e)
{
s="[{image: 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/day3-emily.jpg'}"+
",{image: 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/day3-emily.jpg'}"+
",{image: 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/day3-emily.jpg'}]";
}
<script>
var arr=<%=s %>/////////动态赋值给js变量
$.supersized({
start_slide: 0,
//Start slide (0 is random) //Requires multiple background images
vertical_center: 1,
//Vertically center background
horizontal_center: 1,
//Horizontally center background
min_width: 1000,
//Min width allowed (in pixels)
min_height: 700,
//Min height allowed (in pixels)
fit_portrait: 1,
//Portrait images will not exceed browser height
fit_landscape: 0,
//Landscape images will not exceed browser width
image_protect: 1,
//Disables image dragging and right click with Javascript
slides: arr//////////////
});
</script>