求完整的网页代码,要直接就可以用的
--------------------编程问答-------------------- 如果觉得图片看不清,可以将图片另存到你的电脑硬盘即可使用图片查看器放大。 --------------------编程问答-------------------- 还可以这样玩?网页切图的报价是几百一页。我也关注下,看看谁愿意奉献免费苦力。 --------------------编程问答-------------------- --------------------编程问答--------------------网页切图是什么概念,不懂,这个可以调用javascript用数组取随机数实现,我就是不懂javascript返回的数组怎么处理。 --------------------编程问答-------------------- 坑爹,谁来做苦力,做好了给你点分哈 --------------------编程问答--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>首页DOME</title>
<style type="text/css">
body, html, ul, li
{
margin: 0;
padding: 0;
list-style-type: none;
}
.Nav_Img
{
width: 998px;
height: 200px;
margin: auto;
border: 1px solid red;
}
.Nav_Center
{
width: 998px;
height: 50px;
margin: auto;
border: 1px solid red;
}
.Nav_Center ul
{
}
.Nav_Center ul li
{
height: 50px;
text-align: center;
float: left;
width: 150px;
line-height: 50px;
font-size: 14px;
cursor: pointer;
}
.C_Center
{
border: 1px solid red;
margin: auto;
width: 998px;
height: 100%;
display: table;
}
.CenterDiv
{
height: 200px;
width: 200px;
margin-left: 40px;
margin-top: 15px;
float: left;
margin-bottom: 20px;
}
.CenterDivImg
{
width: 100%;
height: 165px;
}
.CenterDivImg img
{
border: 1px solid red;
width: 100%;
height: 165px;
}
.CenterDivTitle
{
border: 1px solid red;
width: 100%;
height: 35px;
text-align: center;
line-height: 35px;
}
.CenterDivDown
{
margin: auto;
width: 998px;
height: 40px;
border: 1px solid red;
}
</style>
</head>
<body>
<div class="Nav_Img">
</div>
<div class="Nav_Center">
<ul id="Nav_Ul">
<li>首页</li>
<li>注册</li>
<li>登录</li>
<li>简介</li>
<li>关于</li>
</ul>
</div>
<div class="C_Center" id="CenterDiv">
</div>
<div class="CenterDivDown">
</div>
</body>
</html>
<script type="text/javascript">
var employees = [
{ "Image": "http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif", "Url": "1", "Title": "First" },
{ "Image": "http://www.qiyipic.com/life/fix/yaandizhenchegnduzhengan.jpg", "Url": "2", "Title": "Second" },
{ "Image": "http://www.qiyipic.com/life/fix/dengzaihuang.jpg", "Url": "2", "Title": "Second" },
{ "Image": "http://pic2.qiyipic.com/common/20130420/bbfd6153d09044899cfb5ed9f85316a5.jpg", "Url": "2", "Title": "Second" },
{ "Image": "http://pic8.qiyipic.com/common/20130420/d6267c30929747778f4c450da8e1b41f.jpg", "Url": "2", "Title": "Second" },
{ "Image": "http://pic4.qiyipic.com/common/20130420/838c2e4af79d4eb1bd1f4e249e3a3dd4.jpg", "Url": "2", "Title": "Second" },
{ "Image": "http://pic8.qiyipic.com/common/20130420/d6267c30929747778f4c450da8e1b41f.jpg", "Url": "2", "Title": "Second" },
{ "Image": "http://www.qiyipic.com/life/fix/kuangquanshui.jpg", "Url": "2", "Title": "Second" },
{ "Image": "http://www.qiyipic.com/life/fix/zhenquqixiangfuwu.jpg", "Url": "2", "Title": "Second" },
];
var load = OnLoads();
function OnLoads() {
var List = document.getElementById("Nav_Ul").getElementsByTagName("li");
for (var i = 0; i < List.length; i++) {
OnBind(List[i]);
}
RandomImage();
}
function RandomImage() {
var imageCount = employees.length;
var imageAddCount = new Array();
var Count = parseInt(imageCount * Math.random());
for (var i = 0; i <= Count; i++) {
var indexOfimage = parseInt(imageCount * Math.random());
if (imageAddCount.length == 0) {
imageAddCount.push(employees[indexOfimage].Image);
ImageAdd(indexOfimage);
}
else if (!youf(imageAddCount, employees[indexOfimage].Image)) {
imageAddCount.push(employees[indexOfimage].Image);
ImageAdd(indexOfimage);
}
}
}
function youf(arr, val) {
for (i = 0; i < arr.length; i++) {
if (arr[i] == val) {
return true;
} else {
return false;
}
}
}
function ImageAdd(i) {
var C_Center = document.getElementById("CenterDiv");
var DIV = document.createElement("div");
DIV.setAttribute("class", "CenterDiv");
var ImageDiv = document.createElement("div");
ImageDiv.setAttribute("class", "CenterDivImg");
var image = document.createElement("img");
image.setAttribute("src", employees[i].Image);
ImageDiv.appendChild(image);
var TitleDiv = document.createElement("div");
var Title = document.createElement("a");
var text = document.createTextNode(employees[i].Title);
Title.appendChild(text);
Title.setAttribute("href", employees[i].Url);
TitleDiv.setAttribute("class", "CenterDivTitle");
TitleDiv.appendChild(Title);
DIV.appendChild(ImageDiv);
DIV.appendChild(TitleDiv);
C_Center.appendChild(DIV);
}
function OnBind(li) {
Nav_OnClick(li);
Nav_Onmouseover(li);
Nav_Onmouseout(li);
}
function Nav_Onmouseout(button) {
if (button.addEventListener) {
button.addEventListener("mouseout", eventmouseoutFunction, false);
} else if (button.attachEvent) {
button.attachEvent("onmouseout", eventmouseoutFunction);
}
}
function eventmouseoutFunction() {
this.style.fontWeight = "normal";
this.style.fontSize = "14px";
}
function Nav_OnClick(button) {
if (button.addEventListener) {
button.addEventListener("click", eventOnClickFunction, false);
} else if (button.attachEvent) {
button.attachEvent("onclick", eventOnClickFunction);
}
}
function eventOnClickFunction() {
alert("你点击了:" + this.innerHTML);
}
function eventmouseoverFunction() {
this.style.fontWeight = "800";
this.style.fontSize = "35px";
}
function Nav_Onmouseover(button) {
if (button.addEventListener) {
button.addEventListener("mouseover", eventmouseoverFunction, false);
} else if (button.attachEvent) {
button.attachEvent("onmouseover", eventmouseoverFunction);
}
}
</script>
还有BUG自己调试 --------------------编程问答-------------------- 实现起来不困难?
你到是自己试试呀 --------------------编程问答--------------------
补充:.NET技术 , ASP.NET