function func1(a){
document.formname.hiddenName.value=a;
}
document.formname.hiddenName.value=a;
}
解决方案 »
- js如何将字符串数字(包括小数)转换为数值?
- javascript如何读取table中的数据???在线等。。。
- MasterPage与JavaScript的冲突。
- 有个比较奇怪的问题,checkbox的checked="cheecked"属性已添加,但是前边却没有后打钩
- 一个很常用的JS效果,我想了很久都不会,大家帮忙来看看
- 如何得到一个form里面的所有元素,并将所有元素按name和value的格式转换成一个Array数组?
- 如何用JAVASCRIPT屏蔽windows键,帮帮忙
- 急! 如何使A列表框选的值随B列表框的选择而变化?
- 关于html中进行文本编辑的问题?(如何利用javascript来传递这些值?)
- 问两个小问题
- 大家帮忙看看这两句话哪里错了?
- 难啊!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");加上上面的,如果出来,说明付值了,如果没出来,说明没调用