Я никогда не использовал Jquery раньше, и я был, как я мог бы вызвать следующую функцию от onclick
кнопки для работы с textarea
Как называть Jquery
функции
$(document).ready(function() {
$('#demo1').highlightTextarea({
words: {
color: 'red',
words: ['N/A','n/a']
},
debug: true
});
Пример кода я смотрю на это следующее:
HTML код
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<link href="css/jquery.highlighttextarea.css" rel="stylesheet">
<script src="js/jquery.highlighttextarea.js"></script>
</head>
<body>
<textarea rows="4" cols="50">
This is a example n/a of all the following N/A
Thanks
</textarea>
<button type="button" onclick= >Call function </button>
<script type='text/javascript'>
$(document).ready(function() {
$('#demo1').highlightTextarea({
words: {
color: 'red',
words: ['N/A','n/a']
},
debug: true
});
});
</script>
</body>
</html>
Спасибо за помощь, заранее
Зачем вы меняете что-то менять? Я задал вопрос, который хотел, и Мохамед-Юсеф предоставил мне решение, которое я искал !! –