用javascript 在客户端实现三个过程中的操作?不可以实现吗?
解决方案 »
- 求一个简单代码的解释~~!
- 我是一头迷失的羔羊
- 关于Ajax里跳转页面的问题,请各位高手帮忙
- 谁能帮我看看脚本算日期的问题
- 做了个分页,点击页码获取href内容,再次点击就获取不到了
- 再问写一个简单的function
- 更新页面,数据从数据库中读出来,有个问题,原来新增时,一组单选项,每个都有个onclick事件,可读出数据后如何对应这个onclick啊?
- javascript的哪个函数可以判断一个字符串是否为整数?
- 一款支持编辑html,css,js,vbs,asp,sql,vml,dhtml等语言的软件
- ajax问题
- 如何增加播放器的时间进度显示(具体时间,并非进度条)
- 大家看看这个JS怎么写?谢谢
var index = DropDownlist3.selectedIndex;
if(index == 4){
TextBox1.disabled = false;
DropDownList2.disabled = false;
}
else{
TextBox1.disabled = true;
DropDownList2.disabled = true;
}
}///我随便拿你上边的举了个例子,具体的你自己修改吧.
你这不需要用到ASPX的,全都用客户端的JS就成了...
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META Http-Equiv="Content-Type" Content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!--
var _st = window.setTimeout;
window.setTimeout = function(fRef, mDelay) {
if(typeof fRef == 'function'){
var argu = Array.prototype.slice.call(arguments,2);
var f = (function(){ fRef.apply(null, argu); });
return _st(f, mDelay);
}
return _st(fRef,mDelay);
}
function fAlert(x){
alert(x);
}
function fDisabled(doit){
document.all.bSave.disabled=doit;
document.all.bCancel.disabled=doit;
document.all.bAdd.disabled=!doit;
}
function fAdd(){
fDisabled(false);
window.setTimeout(fAlert,3000,'fason1');
}
function fSave(){
fDisabled(true);
window.setTimeout(fAlert,3000,'fason2');
}
function fCancel(){
fDisabled(true);
window.setTimeout(fAlert,3000,'fason3');
}
//-->
</SCRIPT>
</HEAD><BODY>
<FORM METHOD=POST ACTION="">
<INPUT TYPE="button" id="bAdd" value="Add" onclick="fAdd()">
<INPUT TYPE="button" id="bSave" disabled value="Save" onclick="fSave()">
<INPUT TYPE="button" id="bCancel" disabled value="Cancel" onclick="fCancel()">
</FORM>
</BODY>
</HTML>
function checkChange()
{
var CheckBox1 = document.getElementById("CheckBox1");
var DropDownList1 = document.getElementById("DropDownList1");
if(CheckBox1.checked)
{
DropDownList1.disabled = false;
}
else
{
DropDownList1.disabled = true;
}
}function list1Select()
{
var DropDownList1 = document.getElementById("DropDownList1");
var DropDownList3 = document.getElementById("DropDownList3");
var DropDownList4 = document.getElementById("DropDownList4");
if(DropDownList1.selectedIndex != 0)
{
DropDownList3.disabled = false;
DropDownList4.disabled = false;
}
else
{
DropDownList3.disabled = true;
DropDownList4.disabled = true;
}
}function list3Select()
{
var DropDownList2 = document.getElementById("DropDownList2");
var DropDownList3 = document.getElementById("DropDownList3");
var TextBox1 = document.getElementById("TextBox1");
if(DropDownList3.selectedIndex == 4)
{
TextBox1.disabled = false;
DropDownList2.disabled = false;
}
else
{
TextBox1.disabled = true;
DropDownList2.disabled = true;
}
}