textbox 每次变化 触发事件 如果是输入的话就用onkeyup="alert(this.value)"//alert(this.value)这个换成你要执行的代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to vicy不一定是输入,可能是扫描得到的值,你说的这个是在哪里写,是脚本里还是代码里 ,能稍微详细点吗,给个例子,拜托了,谢谢了,急啊 onpropertychange这个好象只ie适用. <html><head><script>function changeprop(){ oprop.value = sText.value;}function changeCSSprop(){ if(oSelect.selectedIndex==0) oStyleprop.style.color= "white"; else oStyleprop.style.color = "black"; oStyleprop.style.backgroundColor = oSelect.value;}function Results(){ sSrc.innerText = event.srcElement.id; sproperty.innerText = event.propertyName;}</script></head><body><div style="background:#eeeeee; padding:10px;">Click the button below to changeits 'Value' property to the string specified in the text box.<br><br><input type="text" style="width:250px" id="sText" value="Enter Some Text"></input><input type=button id="oprop" onclick="changeprop()" value="Change property" onpropertychange="Results();"></p><p>Click the button below to change its 'backgroundColor' Cascading StyleSheet (CSS) property to the color specified in the drop-down list box.<br><select name="oSelect" style="width:150px"><option value="black" style="color:black">Black</option><option value="blue" style="color:blue">Blue</option><option value="green" style="color:green">Green</option><option value="red" style="color:red">Red</option></select><input type=button id="oStyleprop" onclick="changeCSSprop()" value="Change property" onpropertychange="Results();"><br><br> <div style="border:1px solid #cccccc; width:100%; padding:10px;background:white;"> <b>Source object:</b> <span id="sSrc" style="color:red;"></span><br> <b>property Name:</b> <span id="sproperty" style="color:red;"></span> </div></div><br><br></body></html> 我想他如果扫描后写入text不知道ff支持不支持.万恶的ff啊....如果你是ie用onpropertychange就ok了,如果是ff的话,可以考虑用setInterval来搞,嘿嘿~~for ie<input type="text" onpropertychange="alert(this.value)"/> 楼上,我用你给我的Html code 试了一下,不是我要的功能,我需要textbox每次变化自动触发,能不能给改一下,谢谢 IE 用onpropertychange ,FX 用 oninput ,不行就用setInterval()来搞google的自动完成就是setInterval做成的! 我用onpropertychange="alert(this.value)" 试了一下,但是我不擅长用Javascript,有什么办法把alert(this.value),改什么事件,然后再设计代码(vb.net)中做这个工作,谢谢 onpropertychange="eventHandle()" function eventHandle(){} to mumutiger:<input id="TextBox1" onpropertychange="eventHandle();" type="text" runat="server">function eventhandle(){ button1.click()}然后再vb.net 中button1_click()事件中写内容,但我试了好像不行啊? 我想在一个字符串中用正则表达式匹配出一个值 如何根据css名给dt加入事件处理 javascript 遍历判断问题. 求js+xml生成下拉带二级导航条的代码 大家帮忙看一下,这段代码有问题吗? 怎么让<span>一获得焦点就把里面的内容选中? 初学Javascrtpt,有一个简单的问题,请教了! 请教下拉框问题 有谁知道“西祠胡同”中那种利用收音机按钮,进行动态编辑目录树的效果?(关键词:目录树,编辑,动态) 怎么样自动选择 ajax 实现级联菜单的形式,为什么总执行最后一行代码? 【求助】这个代码怎么改,才能实现全选啊?
不一定是输入,可能是扫描得到的值,你说的这个是在哪里写,是脚本里还是代码里 ,能稍微详细点吗,给个例子
,拜托了,谢谢了,急啊
<html>
<head>
<script>
function changeprop()
{
oprop.value = sText.value;
}
function changeCSSprop()
{
if(oSelect.selectedIndex==0)
oStyleprop.style.color= "white";
else
oStyleprop.style.color = "black";
oStyleprop.style.backgroundColor = oSelect.value;
}
function Results()
{
sSrc.innerText = event.srcElement.id;
sproperty.innerText = event.propertyName;
}
</script>
</head>
<body>
<div style="background:#eeeeee; padding:10px;">Click the button below to change
its 'Value' property to the string specified in the text box.<br><br>
<input type="text" style="width:250px" id="sText" value="Enter Some Text"></input>
<input type=button id="oprop" onclick="changeprop()" value="Change property" onpropertychange="Results();"></p>
<p>Click the button below to change its 'backgroundColor' Cascading Style
Sheet (CSS) property to the color specified in the drop-down list box.<br>
<select name="oSelect" style="width:150px">
<option value="black" style="color:black">Black</option>
<option value="blue" style="color:blue">Blue</option>
<option value="green" style="color:green">Green</option>
<option value="red" style="color:red">Red</option>
</select>
<input type=button id="oStyleprop" onclick="changeCSSprop()" value="Change property" onpropertychange="Results();">
<br><br>
<div style="border:1px solid #cccccc; width:100%; padding:10px;background:white;">
<b>Source object:</b> <span id="sSrc" style="color:red;"></span><br>
<b>property Name:</b> <span id="sproperty" style="color:red;"></span>
</div>
</div>
<br><br>
</body>
</html>
万恶的ff啊....如果你是ie用onpropertychange就ok了,如果是ff的话,可以考虑用setInterval来搞,嘿嘿~~for ie
<input type="text" onpropertychange="alert(this.value)"/>
改一下,谢谢
alert(this.value),改什么事件,然后再设计代码(vb.net)中做这个工作,谢谢
function eventHandle()
{}
function eventhandle()
{ button1.click()
}
然后再vb.net 中button1_click()事件中写内容,但我试了好像不行啊?