Skip to content

Tag: html

How can prevent Stored XSS by iframe?

I use Extjs and JS to build a dialog where can display my html data from DB, that data is wrapped with iframe like this: I tried to add sandbox to iframe, but it doesn’t work, the XSS alert still show. Then I tried to change to <iframe src=’#’… sandbox>, but XSS alert still show.…

how do I fix the score in my option quiz?

I have a problem with the option quiz, more precisely with the evaluation of the correct answers. I don’t get a score and it still stays at 0. Thank you for your help. Answer So, First, ids should unique. Remove all your id=”mc”. Second. you need to get the value of the “Selected&#8221…

How to set 4.5 stars with jQuery on page load?

I am trying to make sure that when the page is loaded, the rating is automatically filled with 4.5. There must be four and a half stars active (yellow) with jQuery. My code: What can I do in jQuery to give 4.5 stars to this? Answer The easiest method is to set the value directly in the HTML: using the

Using symbols in an input to format text

I’m struggling to find a solution which allows a user to input in a input field, however they can style their text when it displays after the input for was submitted. For example, a user could enter **message** into the input field, JavaScript can detect that the ** on the start of the word/sentence and…

How to make a number mask using only JavaScript?

good evening. I wanna create a mask for my JavaScript project, using only Pure JavaScript, without any jQuery stuff or anything like that. What a want to do is, while I’m writing a bunch of numbers, they will be placed in certain spots. Like, for the final format, I want to do “XXX.XXX.XXX-XX&#822…