Skip to content

Instantly share code, notes, and snippets.

Avatar

Tony Ng tonystaark

  • Kuala Lumpur, Malaysia
View GitHub Profile
View gist:54f5c3e3956c0f7ac281c1bf9fa0faec
/ means the root of the current drive;
./ means the current directory;
../ means the parent of the current directory.
View HTML and JS
If you want to clear something after you insert an input value; set inputtext.value = ''
If you want elements like buttons/images to appear on different line in HTML, <div> to separate into lines
If you want to change certain index, you can access it like changeTodoPositionInput.value but .value will return string; but you can do .valueAsNumber, to make it number
changeTodo: function(){
var changeTodoPositionInput = document.getElementById('changeTodoPositionInput')
var changeTodoTextInput = document.getElementById('changeTodoTextInput')
todoList.changeTodo(changeTodoPositionInput.valueAsNumber, changeTodoTextInput.value)
}
One method of listing <ul><li></li></ul>
You can’t perform that action at this time.