Here is an HTML code generator for a button that fulfills the given requirements:
Create a field called 類型 with a dropdown list of 新盤, WhatsApp, 新聞, 自訂URL.
When selected 新盤, show a field called '跳轉頁面' with input box and placeholder '請輸入新盤ID'. Then show a field called 'Button 文字', with input box with default text '即睇新盤'. Then show a button called 'Generate'. Then show the button with the below style:
text
'Button 文字'
When selected WhatsApp, show a field called '跳轉頁面' with input box and placeholder ''. Then show a field called 'Button 文字', with input box with default text '立即查詢'. Then show a field called 'WhatsApp 文字', with input box with default text '你好'. Then show a button called 'Generate'. Then show the button with the below style:
text
<a class="button" href=跳轉頁面'&text='WhatsApp 文字' " target="_blank" style="background-color: rgb(0, 255, 0); color: rgb(255, 255, 255); padding: 12px; border: 2px solid rgb(0, 0, 0); border-radius: 5px; font-size: 16px; font-weight: normal; text-align: center; text-decoration: none; display: inline-block;">'Button 文字'
When selected 新聞, show a field called '跳轉頁面' with input box and placeholder '請輸入新聞ID'. Then show a field called 'Button 文字', with input box with default text '立即查看'. Then show a button called 'Generate'. Then show the button with the below style:
text
<a class="button" href=跳轉頁面' " target="_blank" style="background-color: rgb(0, 0, 0); color: rgb(255, 0, 0); padding: 12px; border: 2px solid rgb(0, 0, 0); border-radius: 5px; font-size: 16px; font-weight: normal; text-align: center; text-decoration: none; display: inline-block;">'Button 文字'
When selected 自訂URL, show a field called '跳轉頁面' with input box and placeholder '請輸入自訂URL'. Then show a field called 'Button 文字', with input box with default text '立即查看'. Then show a button called 'Generate'. Then show the button with the below style:
text
'Button 文字'
Show a text containing the HTML code of the button for me to copy.
Here is the HTML code generator:
xml
類型:
Generate