function func1(a){
document.formname.hiddenName.value=a;
}
document.formname.hiddenName.value=a;
}
解决方案 »
- ajax循环问题,需要牛人解答,急急急!!!
- 一段JS验证代码,可有高人来简化下
- 关于网页二级菜单
- 我想为 Number 类修改 toString()方法,为何总是不成功呢?
- js代码
- 急!!一个关于无闪动刷新页面的问题!!
- <script src="1.aspx"></script> 如何获取1.aspx里面的内容
- 请问怎样用JAVASCRIPT限制文本框输入是0-18的整数,而且是必须输入的,谢谢
- 如何让弹出窗口直接弹出在一个自己指定的网页里面?
- 请问:如何下载网页,用代码实现;要保存指定网页上的所有部分到指定的地方
- 大家帮忙看看这两句话哪里错了?
- 难啊!javascript这个怎么变换!我alert怎么出来是乱码
String strname="你想要的值";
%>
<script language=javascript>
function func1(){
document.formname.hiddenName.value=<%=strname%>;
}
</script>
function changeDrop2()
{
if (document.form1.Drop1.options[document.form1.Drop1.selectedIndex].value == "选择板块") with(document.form1.Drop2){
length = 1;
selectedIndex = 0
options[0].text = '无';
options[0].value = '无';
}
<%set rs1=server.createobject("adodb.recordset")
sql1="select * from fbk order by shijian asc"
rs1.open sql1,conn,1,3
for i=1 to rs1.recordcount %>
if (document.form1.Drop1.options[document.form1.Drop1.selectedIndex].value == "<%=rs1("name")%>") with(document.form1.Drop2){
<% set rs2=server.createobject("adodb.recordset")
sql2="select * from fzbk where cid='"&rs1("id")&"'"
rs2.open sql2,conn,1,3
if rs2.bof and rs2.eof then rs2count=1 else rs2count=rs2.recordcount end if %>
length = <%=rs2count%>;
selectedIndex = 0 ;
<%if rs2.recordcount>1 then
for e=1 to rs2.recordcount
response.write "options["&e-1&"].text='"&rs2("name")&"';"
response.write "options["&e-1&"].value='"&rs2("name")&"';"
rs2.movenext
next
else
response.write"options[0].text = '无';"
response.write"options[0].value = '无';"
end if
rs2.close
set rs2=nothing %>
}
<%rs1.movenext
if rs1.eof then exit for
next
rs1.close
set rs1=nothing %>
}
</script>
var aa;//aa未某个值
document.form1.pictures.value=aa;
add_news.jsp提交后并没有对hidden的Content赋值,请问这是什么原因呢?
如果还回到add_news.jsp,
var aa;//aa未某个值
document.form1.pictures.value=aa;
要是在<body onload="func1()">
function func1(){
var aa;//aa未某个值
document.form1.pictures.value=aa;}中才行,
如果不回到这个页面,当然不会给他伏值了
var aa;//aa未某个值
document.form1.pictures.value=aa;
add_news.jsp提交后并没有对hidden的Content赋值?
<input type=hidden name="pictures">
document.form1.pictures.value=aa; //hidden的pictures赋值
<input type=hidden name="Content">
document.form1.Content.value=aa; //hidden的Content赋值
var aa;//aa未某个值
document.form1.pictures.value=aa;
alert("222");加上上面的,如果出来,说明付值了,如果没出来,说明没调用