var themes2="dark";
if(isCanvasSupported()){
$('#body-wrapper').after('<div id="palette"> \
<div id="paletteHeader"> \
<div id="colorResult">#0199FE</div> \
<a href="javascript:void(0);" class="closeButton"></a> \
<a href="javascript:void(0);" class="openButton"></a> \
</div> \
<div id="paletteBody"> \
<div id="colorPicker"></div> \
<canvas id="colorPalette" width="150" height="150"></canvas> \
</div> \
<div id="ThemeSwitch"> \
<a class="themeBtn light " href="javascript:void(0)" onclick="changeTheme(\'light\')">LIGHT</a> \
<a class="themeBtn dark selected" href="javascript:void(0)" onclick="changeTheme(\'dark\')">DARK</a> \
</div> \
<form name="myform" method="post" onSubmit="**return onsubmitform()**;">
<input type="submit" value="Kaydet"> \
</form> \
</div>');
我编写了一些东西。作为回报 onsubmitform() 表单操作什么也不做。onsubmitform 函数:
function onsubmitform()
{
document.myform.action ="?tasarim="+themes2;
return true;
}
我想要一些“index.php?tasarim=dark”,但浏览器只重定向“index.php”......我该怎么办?