익스에서는 되는데 크롬에서는 안되네요

· 14년 전 · 977 · 2
브랜드별,모델별로 검색하는 건데요 익스에서는 되는데 그외 크롬이나 사파리에선 안돼네요
어떤식으로 수정해야 좋을까요?
--------------------------------------------------------------------
function makechange()
{
var f = document.fsearch_cars;

brandview(f.make.value);
}


function brandchange()
{
var f = document.fsearch_cars;

}


function locaview()
{
var f = document.fsearch_cars;

f.loca.options.length = 1;
f.loca.options[0].text = "지역(전체)";
car = cars["지역"].split(",");
f.loca.options.length = car.length+1;
for (i=0; i<car.length; i++) {
f.loca.options[i+1].value = car[i];
f.loca.options[i+1].text = car[i];
}
}



function yearview()
{
var f = document.fsearch_cars;

f.year.options.length = 1;
f.year.options[0].text = "연식(전체)";
car = cars["연식"].split(",");
f.year.options.length = car.length+1;
for (i=0; i<car.length; i++) {
f.year.options[i+1].value = car[i];
f.year.options[i+1].text = car[i];
}
}

function modelview(make, brand)
{
var f = document.fsearch_cars;

f.model.options.length = 1;
f.model.options[0].text = "등급(전체)";
f.model.options[0].selected = true;
if (!make || !brand) {
return;
}

car = cars[make+"->"+brand].split(",");
f.model.options.length = car.length+1;
for (i=0; i<car.length; i++) {
f.model.options[i+1].value = car[i];
f.model.options[i+1].text = car[i];
}
}

function brandview(make)
{
var f = document.fsearch_cars;

f.brand.options.length = 1;
f.brand.options[0].text = "모델(전체)";
f.brand.options[0].selected = true;
if (!make) {
return;
}

car = cars[make].split(",");
f.brand.options.length = car.length+1;
for (i=0; i<car.length; i++) {
f.brand.options[i+1].value = car[i];
f.brand.options[i+1].text = car[i];
}
}

function makeview()
{
var f = document.fsearch_cars;

f.make.options.length = 1;
f.make.options[0].text = "브랜드(전체)";
car = cars["제조사"].split(",");
f.make.options.length = car.length+1;
for (i=0; i<car.length; i++) {
f.make.options[i+1].value = car[i];
f.make.options[i+1].text = car[i];
}
}
function onChangeKey() {
var make = document.fsearch_cars.make.value;
var brand = document.fsearch_cars.brand.value;
var year = document.fsearch_cars.year.value;
var loca = document.fsearch_cars.loca.value;

if (make == "" && brand == ""&& year == ""&& loca == "") {
alert("브랜드나 연식을 선택하세요!!");
return false;
} else {
if (year == ""&& loca == "") {
document.fsearch_cars.stx.value = make+ " " + brand;
} else {
if (loca == "") {
document.fsearch_cars.stx.value = make + " " + year + " " + brand;
}else {

document.fsearch_cars.stx.value = make + " " + brand + " " + loca + " " + year;
}
}
document.fsearch_cars.submit();
}
}
|

댓글 2개

getElementById 로 변경해서 해보세요~
너무 고차원적이십니다~ 뭘 바꿔야하죠?
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
14년 전 조회 1,535
14년 전 조회 2,364
14년 전 조회 958
14년 전 조회 865
14년 전 조회 954
14년 전 조회 1,595
14년 전 조회 984
14년 전 조회 1,618
14년 전 조회 1,596
14년 전 조회 978
14년 전 조회 996
14년 전 조회 1,538
14년 전 조회 1,106
14년 전 조회 1,013
14년 전 조회 1,006
14년 전 조회 1,556
14년 전 조회 1,221
14년 전 조회 1,028
14년 전 조회 1,573
14년 전 조회 1,706