87,904
社区成员
发帖
与我相关
我的任务
分享
function GetCityText()
{
var strs= new Array();
strs=["上海","广州","南京","苏州","宁波","沈阳","杭州","深圳","重庆","成都"];
var s=document.getElementById("city").value;
for(i=0;i<strs.length;i++){
if(strs[i].toString().indexOf(s)!=-1){
return true;
break;
}
}
return false;
}
function CheckImportCity()
{
alert(GetCityText());
if(GetCityText()==true){
document.all.vipcity.style.visibility='visible';
}
else{
document.all.vipcity.style.visibility='hidden';
}
}
<tr>
<td><div id="vipcity" style="visibility:hidden">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr> <td><label>XXX多长时间可以起效?</label>
<input name="qzxttRemarkP" type="text" class="input_out" id="qzxttRemarkP" size="10")" > 分钟</td>
</tr>
<tr> <td ><label>在您门店有销售的所有XXX中,适应症最广的XXX是哪个?</label>
<input name="qzxttRemarkQ" type="text" class="input_out" id="qzxttRemarkQ" size="30")" /> </td>
</tr>
<tr> <td> <label>运动扭伤,XXX能直接使用吗?</label>
<input name="qzxttRemarkR" type="radio" value="能" id="qzxttRemarkR1"> 能
<input name="qzxttRemarkR" type="radio" value="不能" id="qzxttRemarkR2"> 不能
<label>为什么?</label>
<input name="qzxttRemarkS" type="text" class="input_out" id="qzxttRemarkS" size="80")"> </td>
</tr>
</table></div>
<td width="220">城市:
<select id="city" name="aaCity" onchange="CheckImportCity();">
</select>
<select id="city" name="aaCity" onchange="CheckImportCity();">
<option value="天津">天津</option>
<option value="上海">上海</option>
<option value="北京">北京</option>
</select>
function CheckImportCity()
{
alert(GetCityText());
if(GetCityText()==true){
document.getElementById('vipcity').style.visibility='visible';
}
else{
document.getElementById('vipcity').style.visibility='hidden';
}
}
alert(GetCityText());
都没弹出来
function CheckImportCity()
{
alert(GetCityText());
if(GetCityText()==true){
document.all.vipcity.style.visibility='visible';
}
else{
color=#FF0000] document.all.vipcity.style.visibility='hidden'; [/color]
}
}