1、HTML结构
<img src="1.png" id="test">
2、javascript代码
function change(n){
if(n>5) n=1 // 一共5张图片,所以循环替换
document.getElementById("test").setAttribute("src", n+".png")
n++
setTimeout("change("+n+")",1000)
}
window.onload = function(){
setTimeout("change(1)", 1000)
}
series: [{itemStyle: {
normal: {
label: {
textsytel: {
fontsize: //这里设置字体的倾斜度
}
}
}
}
你用什么东西写代码的,用JAVA或者C#或者其他的获取数据库数据很简单,然后通过异步传到JS。function buynow() {
$.ajax({
type: "GET",
url: "/ashx/ashxchecksession.ashx",
timeout: 5000,
success: function (data) {
buynow_do(data)
},
complete: function (XMLHttpRequest, status) {
if (status == 'timeout') {
alert("请求超时!")
}
if (status == 'error') {
alert("请求错误!")
}
}
})
}
function buynow_do(data)
{
if (data != null &&data == "0") {
alert("请先登录")
window.location = "/login.aspx"
}
else {
var gid = $("#hidgoodsid").val()
var price = $("#lablowprice").val()
var score = $("#highscore").val()
var num = $("#goodsnum").val()
window.location = "/shoppingcart.aspx?gid=" + gid + "&price=" + price + "&score=" + score + "&num=" + num
}
}
需要引用JQUERY