top.js 853 B

123456789101112131415161718192021222324252627282930313233343536
  1. function addBookmark(title,url) {
  2. if (window.sidebar) {
  3. window.sidebar.addPanel(title, url,"");
  4. } else if( document.all ) {
  5. window.external.AddFavorite( url, title);
  6. } else if( window.opera && window.print ) {
  7. return true;
  8. }
  9. }
  10. function find(){
  11. o=theForm.finds;
  12. tmp=o.options[o.selectedIndex].value;
  13. url=tmp+"&k="+theForm.find_.value;
  14. window.parent.doc2.document.location.href=url;
  15. }
  16. function submitByEventAction(formName, actionName, event) {
  17. var rs = true;
  18. if (event != null)
  19. rs = event();
  20. if (rs || rs == undefined) {
  21. var forms = document.getElementsByName(formName);
  22. if (forms.length > 0) {
  23. var firstForm = forms[0];
  24. if ($(firstForm).attr("disable")) {
  25. return false;
  26. }
  27. $(firstForm).attr("target", "_self");
  28. $(firstForm).attr("disable", "true");
  29. firstForm.action = actionName;
  30. firstForm.submit();
  31. }
  32. }
  33. }