<!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>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />
<title>自定义表单1 - powered by dedecms</title>
<link href="img/nspage.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../include/dedeajax2.js"></script>
</head>
<body>
<div class="main mceneter">
<div class="toplogo">
<div class="logo">
<a href="/"><img src="/templets/default/images/logo.gif" /></a>
</div>
<div class="title">
<a href='diy.php?action=list&diyid=1'>自定义表单1</a> >发布信息
</div>
</div>
<div class="cmain">
<div class="ctitle">
<h1>自定义表单1发布</h1>
<span></span>
</div>
<div class="cbox mceneter">
<div class="maplist">
<br />
<form action="/plus/diy.php" enctype="multipart/form-data" method="post">
<input type="hidden" name="action" value="post" />
<input type="hidden" name="diyid" value="1" />
<input type="hidden" name="do" value="2" />
<table style="width:97%" cellpadding="0" cellspacing="1">
<tr>
<td align="right" valign="top">范例:</td>
<td><select name='fl' style='width:150px'><option value='男'>男</option>
<option value='女'>女</option>
<option value='人妖'>人妖</option>
</select>
</td>
</tr>
<input type="hidden" name="dede_fields" value="fl,select" />
<input type="hidden" name="dede_fieldshash" value="db5f139909450665fd4b641fff161416" /></table>
<div align='center' style='height:30pxpadding-top:10px'>
<input type="submit" name="submit" value="提 交" class='coolbg' />
<input type="reset" name="reset" value="重 置" class='coolbg' />
</div>
</form>
</div>
</div>
</div>
</div>
<div class="copyright mceneter">
Powered by <a href="http://www.dedecms.com" target="_blank">DedeCMS</a>© 2004-2009 <a href="http://www.desdev.cn" target="_blank">DesDev</a>Inc.
</div>
</body>
</html>
这里有一个例子,经过改善过,直接输入就可以用
<html><head>
<title>人才网站的职位选择功能代码</title>
<script>
function move(fbox,tbox) {
var i = 0
if(fbox.value != "") {
var no = new Option()
no.value = fbox.value
no.text = fbox.value
tbox.options[tbox.options.length] = no
fbox.value = ""
}
}
function remove(box) {
for(var i=0 i<box.options.length i++) {
if(box.options[i].selected && box.options[i] != "") {
box.options[i].value = ""
box.options[i].text = ""
}
}
BumpUp(box)
}
function BumpUp(abox) {
for(var i = 0 i < abox.options.length i++) {
if(abox.options[i].value == "") {
for(var j = i j < abox.options.length - 1 j++) {
abox.options[j].value = abox.options[j + 1].value
abox.options[j].text = abox.options[j + 1].text
}
var ln = i
break
}
}
if(ln < abox.options.length) {
abox.options.length -= 1
BumpUp(abox)
}
}
function Moveup(dbox) {
for(var i = 0 i < dbox.options.length i++) {
if (dbox.options[i].selected && dbox.options[i] != "" && dbox.options[i] != dbox.options[0]) {
var tmpval = dbox.options[i].value
var tmpval2 = dbox.options[i].text
dbox.options[i].value = dbox.options[i - 1].value
dbox.options[i].text = dbox.options[i - 1].text
dbox.options[i-1].value = tmpval
dbox.options[i-1].text = tmpval2
}
}
}
function Movedown(ebox) {
for(var i = 0 i < ebox.options.length i++) {
if (ebox.options[i].selected && ebox.options[i] != "" && ebox.options[i+1] != ebox.options[ebox.options.length]) {
var tmpval = ebox.options[i].value
var tmpval2 = ebox.options[i].text
ebox.options[i].value = ebox.options[i+1].value
ebox.options[i].text = ebox.options[i+1].text
ebox.options[i+1].value = tmpval
ebox.options[i+1].text = tmpval2
}
}
}
</script>
</head>
<body>
<form ACTION="" METHOD="POST">
<table align="center">
<tr>
<td>
<input type="text" name="list1" value="">
</td>
<td>
<input type="button" value="添加" onclick="move(this.form.list1,this.form.list2)" name="B1"><br>
<input type="button" value="删除" onclick="remove(this.form.list2)" name="B2"><br><br>
<input type="button" value="上移" onclick="Moveup(this.form.list2)" name="B3"><br>
<input type="button" value="下移" onclick="Movedown(this.form.list2)" name="B4">
</td>
<td>
<select multiple size=7 name="list2">
<option value="one">ASP</option>
<option value="two">PHP</option>
<option value="three">ASP.NET</option>
<option value="four">DELPHI</option>
<option value="five">VB</option>
<option value="six">AJAX</option>
</select>
</td>
</tr>
</table>
</form>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)