pty.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //商品分类点击筛选
  2. function typeonc(x,y){
  3. ptype2.location="../tem/protype2.php?type1id="+x;
  4. document.getElementById("type1name").innerHTML=y+" >> ";
  5. document.f1.type1id.value=x;
  6. document.getElementById("type2name").innerHTML="";
  7. document.getElementById("type3name").innerHTML="";
  8. document.f1.type2id.value=0;
  9. document.f1.type3id.value=0;
  10. ptype3.location="../tem/protype3.php";
  11. }
  12. function tjadd(w,u){
  13. if(document.f1.type1id.value=="0"){alert("请选择商品类别");return false;}
  14. if(1==u){if(document.f1.t1.value==""){alert("请输入会员帐号");return false;}}
  15. if(document.getElementById("C1").checked==false){alert("请先阅读并同意商品发布须知条款");return false;}
  16. f1.action=w+"?control=add";
  17. }
  18. function tjupdate(w,x,y){
  19. if(document.f1.type1id.value=="0"){alert("请选择商品类别");return false;}
  20. if(document.getElementById("C1").checked==false){alert("请先阅读并同意商品发布须知条款");return false;}
  21. f1.action=w+"?control=update&id="+x+"&bh="+y;
  22. }
  23. //商品图片鼠标移动
  24. function tphover(x){
  25. try{document.getElementById("tpf"+x).tover(); //适用FF、ie8
  26. }catch(e){
  27. window.frames["tpf"+x].tover(); //适用IE6、7
  28. }
  29. }
  30. function tphout(x){
  31. try{document.getElementById("tpf"+x).tout(); //适用FF、ie8
  32. }catch(e){
  33. window.frames["tpf"+x].tout(); //适用IE6、7
  34. }
  35. }