# html 提供 - 不能使用 inline-script, 修改為JQuery或 JavaScript 綁定 ```jsx <a id="caseTab02" href="javascript:void(0)" onclick="caseTab(2)"> <a class="TB01 selected" onclick="SetTab(1)">中央機關</a> <a class="TB02" onclick="SetTab(2)">地方政府</a> <input type="text" name="textfield" id="textfield" class="textfield" runat="server" onkeypress="return KeyPress(this, event);" /> ``` ```jsx <a class="TB01 selected SetTab1" >中央機關</a> <a class="TB02 SetTab2">地方政府</a> $(".SetTab1").on("click", function () { SetTab(1); }); $(".SetTab2").on("click", function () { SetTab(2); }); $('#textfield').on('keypress', function (event) { return KeyPress(this, event); }); ``` --- - fadeOut, fadeIn 不能使用 (我猜是JQuery的動畫都沒辦法用) ```jsx $("#tabPane01").fadeOut(100); if (idx == 1) { $("#tab01").addClass("current"); $("#tabPane01").fadeIn(300); } ``` --- - Inline-Style 不能使用, `style="..."` 改用 `class="..."` (自定義class 或是使用 boostrap) ```jsx <div id="tabPane03" style="text-align: center; margin: 20px auto;"> ``` ```jsx .subTabBox { text-align: center; margin: 20px auto; } <div id="tabPane03" class="subTabBox"> ``` --- - 非共用style需要放置在同一個html裡(`<style>...</style>`) ---
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up