Jump to content
View in the app

A better way to browse. Learn more.

Дизайн и модификация Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

с BB кодом спойлера проблема

Всем доброго времени суток.У меня проблема с BB кодом спойлера. Когда я нажимаю на кнопку "Открыть спойлер" появляется в спойлере текст "cool" а должен появляться текст который я написал в сообщении между тегами

[spoiler][/spoiler]

. Помогите пожалуйста решить проблему.

 

Вот сам ББ код:

 

<div><input value="Открыть спойлер" style="width:150px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Спрятать спойлер'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Еще раз показать?'; }" type="button" />
<div id="show" style="display: none; background-color:transparent; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">
cool </div>
<div style="display: none;">
{content}
</div>
</div>

Featured Replies

"cool" в коде ббкода не смущает?..

 

Правильный вариант

<div><input value="Открыть спойлер" style="width:150px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Спрятать спойлер'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Еще раз показать?'; }" type="button" />
<div id="show" style="display: none; background-color:transparent; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">{content}</div>
</div>

  • Author

"cool" в коде ббкода не смущает?..

 

Правильный вариант

<div><input value="Открыть спойлер" style="width:150px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Спрятать спойлер'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Еще раз показать?'; }" type="button" />
<div id="show" style="display: none; background-color:transparent; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">{content}</div>
</div>

 

Спасибо всё теперь нормально работает :) Можно тему закрывать

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.