1 頁 (共 1 頁)

[討論]字型大小的設定

發表於 : 2003-07-25 05:14
joger123
不知道有沒有人提過

不過我再用的時候感覺不是很方便

像是字型顏色都有一各預設值~選擇後會再恢復預設值\r

可是字型大小卻沒有

像我都習慣打完文章在去編輯\r

這樣同樣要用"大"字的時候就很麻煩了

因為第一次可以選大去變化~第2次就不可以再用了

不知道有沒有辦法改成跟字型顏色一樣~會自動跑回預設值呢??

希望會的人可以順便教教我^^
謝謝

發表於 : 2003-07-25 08:19
動機不明
讓BBCODE在選擇字型變化後自動恢復預設值!!

修改 posting_body.tpl

字型顏色\r

代碼: 選擇全部

<select name="addbbcode32" onChange="bbfontstyle('[color=' + this.form.addbbcode32.options[this.form.addbbcode32.selectedIndex].value + ']', '[/color]')" onMouseOver="helpline('s')">
為\r

代碼: 選擇全部

<select name="addbbcode32" onChange="bbfontstyle('[color=' + this.form.addbbcode32.options[this.form.addbbcode32.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
字型大小

代碼: 選擇全部

<select name="addbbcode34" onChange="bbfontstyle('[size=' + this.form.addbbcode34.options[this.form.addbbcode34.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
為\r

代碼: 選擇全部

<select name="addbbcode34" onChange="bbfontstyle('[size=' + this.form.addbbcode34.options[this.form.addbbcode34.selectedIndex].value + ']', '[/size]');this.selectedIndex=2;" onMouseOver="helpline('f')">
重點在於: ;this.selectedIndex=?(預設值);

發表於 : 2003-07-25 08:37
joger123
感謝河風大大^^
這就去改^^

發表於 : 2003-07-25 08:56
joger123
河風大大~沒辦法說\r
首先~找不到你代碼裡面的字樣~~
我的是

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')") onMouseOver="helpline('f')">
我一樣改最後面onMouseOver="helpline('f')">改成this.selectedIndex=2;" onMouseOver="helpline('f')">

可是一樣沒辦法

而且我是想跟顏色一樣~多一各字樣(預設值)
不管選到什麼大小~都會跳回預設值~這樣我可以全部寫完後~很快把要變大的字一次改完

請問應該怎麼用呢?

發表於 : 2003-07-25 17:15
io_oi
這個好棒!!!
一次就成功了
用了這麼久才知道有這種方式...

發表於 : 2003-07-25 17:19
io_oi
joger123 寫: 我的是

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')[size=184][color=red][b]")[/b][/color][/size] onMouseOver="helpline('f')">
我一樣改最後面onMouseOver="helpline('f')">改成this.selectedIndex=2;" onMouseOver="helpline('f')">
可是一樣沒辦法
試試這個

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.selectedIndex=2;" onMouseOver="helpline('f')">
你應該是多了紅色部分...

發表於 : 2003-07-25 20:55
動機不明

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')")[color=red];this.selectedIndex=2;" [/color]onMouseOver="helpline('f')">
io_oi 以後的問題交給你負責吧!.... :mrgreen: (週末放假去~)

發表於 : 2003-07-25 20:58
william91
河風 寫:
io_oi 以後的問題交給你負責吧!.... :mrgreen: (週末放假去~)
河風偷懶去 8-)

發表於 : 2003-07-25 21:43
io_oi
河風 寫:

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')")[color=red];this.selectedIndex=2;" [/color]onMouseOver="helpline('f')">
io_oi 以後的問題交給你負責吧!.... :mrgreen: (週末放假去~)
我做錯了什麼嗎?? :-o

發表於 : 2003-07-25 22:05
william91
io_oi 寫:
河風 寫:

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')")[color=red];this.selectedIndex=2;" [/color]onMouseOver="helpline('f')">
io_oi 以後的問題交給你負責吧!.... :mrgreen: (週末放假去~)
我做錯了什麼嗎?? :-o
不是......是河風大大懶...少了一個,...................應該這樣說:
io_oi ,以後的問題交給你負責吧!.... :mrgreen: (週末放假去~)

發表於 : 2003-07-25 22:27
io_oi
我上面的程式碼有誤嗎? :-(

我剛剛又試了一下

正確

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')[size=184][b][color=blue];this.selectedIndex=2;[/color][/b][/size]" onMouseOver="helpline('f')">
錯誤

代碼: 選擇全部

<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')[size=184][b][color=red]")[/color][/b][/size][size=184][b][color=blue];this.selectedIndex=2;[/color][/b][/size]" onMouseOver="helpline('f')">

發表於 : 2003-07-30 06:51
joger123
一切ok囉
感謝各位的幫忙^^