Zen Cart 中文版
this is test
| HEADING_TITLE
商品分类 - ===首页 |
pixel_trans.gif|型号 |
|
|
|
|
|
上面表单中只有securityToken 以及categories_id两个选项,但是表单提交(post方法)后$_POST数组中还有categories_name[],categories_description[]等其他的很多的选项,并且提交按钮并没有在这个表单
...
选项的里面而是正在外面,同时提交按钮好像没有绑定js事件,不知道是怎么回事?
一共只加载了两个js文件,感觉和这个表单提交也没有关系啊
general.js
function SetFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type != "image") &&
(field.elements[i].type != "hidden") &&
(field.elements[i].type != "reset") &&
(field.elements[i].type != "submit")) {
document.forms[0].elements[i].focus();
if ((field.elements[i].type == "text") ||
(field.elements[i].type == "password"))
document.forms[0].elements[i].select();
break;
}
}
}
}
function rowOverEffect(object) {
if (object.className == 'dataTableRow') object.className = 'dataTableRowOver';
}
function rowOutEffect(object) {
if (object.className == 'dataTableRowOver') object.className = 'dataTableRow';
}
menu.js
// combined config.js and cssjsmenu.js for performance reasons
// to save a cache check and an inline script
// config.js
checkForUpgrade();
function hide_dropdowns(what) {
if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1)
if (what == "in") {
var anchors = document.getElementsByTagName("select");
for (var i = 0; i < anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("rel") == "dropdown") {
anchor.style.position = "relative";
anchor.style.top = "0px";
anchor.style.left = "-2000px";
}
}
} else {
var anchors = document.getElementsByTagName("select");
for (var i = 0; i < anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("rel") == "dropdown") {
anchor.style.position = "relative";
anchor.style.top = "0px";
anchor.style.left = "0px";
}
}
}
}
function ndeSetStyleSheet(newtitle) {
ndeCreateCookie('nde-style', newtitle, 365, false);
if (ndeReadCookie('nde-style') == newtitle) {
window.location.reload(true);
}
else {
alert('You must enable Cookies in order for theme selection to work');
}
}
function ndeSetTextSize(chgsize, rs) {
if (!document.documentElement || !document.body) {
return;
}
var newSize;
var startSize = parseInt(ndeGetDocTextSize());
if (!startSize) {
startSize = 12;
}
switch (chgsize) {
case 'incr':
newSize = startSize + 2;
break;
case 'decr':
newSize = startSize - 2;
break;
case 'reset':
if (rs) {
newSize = rs;
}
else {
newSize = 12;
}
break;
default:
newSize = parseInt(ndeReadCookie('nde-textsize', true));
if (!newSize) {
newSize = startSize;
}
break;
}
if (newSize < 10) {
newSize = 10;
}
newSize += 'px';
document.documentElement.style.fontSize = newSize;
document.body.style.fontSize = newSize;
ndeCreateCookie('nde-textsize', newSize, 365, true);
}
function ndeGetDocTextSize() {
if (!document.body) {
return 0;
}
var size = 0;
var body = document.body;
if (body.style && body.style.fontSize) {
size = body.style.fontSize;
}
else if (typeof(getComputedStyle) != 'undefined') {
size = getComputedStyle(body, '').getPropertyValue('font-size');
}
else if (body.currentStyle) {
size = body.currentStyle.fontSize;
}
return size;
}
function ndeCreateCookie(name, value, days, useLang) {
var langString = useLang ? ndeGetLang() : '';
var cookie = name + langString + '=' + value + ';';
if (days) {
var date = new Date();
var ndeMilliSecondsInDay = 86400000; // 24*60*60*1000
date.setTime(date.getTime() + (days * ndeMilliSecondsInDay));
cookie += ' expires=' + date.toGMTString() + ';';
}
cookie += ' path=/';
document.cookie = cookie;
}
function ndeReadCookie(name, useLang) {
var langString = useLang ? ndeGetLang() : '';
var nameEQ = name + langString + '=';
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1, c.length);
}
if (c.indexOf(nameEQ) == 0) {
return c.substring(nameEQ.length, c.length);
}
}
return null;
}
function ndeSetTheme() {
ndeSetTextSize();
return true;
}
function ndeGetLang() {
var langString = '';
if (document.documentElement) {
langString = document.documentElement.lang;
if (langString != '') {
langString = '-' + langString;
}
}
return langString;
}
function checkForUpgrade() {
var rvValue = -1;
if (navigator.product == 'Gecko') {
rvValue = 0;
var ua = navigator.userAgent.toLowerCase();
var rvStart = ua.indexOf('rv:');
var rvEnd = ua.indexOf(')', rvStart);
var rv = ua.substring(rvStart + 3, rvEnd);
var rvParts = rv.split('.');
var exp = 1;
for (var i = 0; i < rvParts.length; i++) {
var val = parseInt(rvParts[i]);
rvValue += val / exp;
exp *= 100;
}
}
if (!document.getElementById || ( rvValue >= 0 && rvValue < 1.0)) {
var updateMessageShown = ndeReadCookie('upgrade');
if (!updateMessageShown) {
ndeCreateCookie('upgrade', '1', 90);
// check if cookie written. If not, don't redirect
if (ndeReadCookie('upgrade')) {
document.location = '/upgrade.html';
}
}
}
}
function printAlert() {
alert('Thanks to the use of a print-media stylesheet, this page is already printer-friendly! Just print the a
type=image 本质也是和type=submit类似,只是多了图片的属性,属于图形化提交按钮。这种按钮点击后就触发默认表单提交事件。
详见 http://www.w3.org/TR/html401/interact/forms.html#h-17.4.1